This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function forcefully_publish_all_events() { | |
| global $wpdb; | |
| // Get all event IDs directly from the database | |
| $event_ids = $wpdb->get_col(" | |
| SELECT ID | |
| FROM {$wpdb->posts} | |
| WHERE post_type = 'tribe_events' | |
| AND post_status NOT IN ('publish') | |
| "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('init', function() { | |
| global $wpdb; | |
| // Title of the events to delete | |
| $event_title = 'Scrabble 1'; | |
| // Query to find events with the specified title | |
| $events = $wpdb->get_results( | |
| $wpdb->prepare( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function modify_organizer_type_properties( $properties ) { | |
| // Change the slug to "ponent" | |
| $properties['rewrite']['slug'] = 'ponent'; | |
| return $properties; | |
| } | |
| // Hook into the organizer type registration for Events Calendar Pro | |
| add_filter( 'tribe_events_register_organizer_type_args', 'modify_organizer_type_properties' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function custom_recurrence_max_months( $value ) { | |
| return 12; // Change to 6 or 12 for better performance | |
| } | |
| add_filter( 'tribe_get_option_recurrenceMaxMonthsAfter', 'custom_recurrence_max_months' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Force organizer post type slug to "ponent" | |
| function modify_organizer_type_properties( $properties ) { | |
| $properties['rewrite'] = array( | |
| 'slug' => 'ponent', | |
| 'with_front' => false, // Optional: depends on your permalink settings | |
| ); | |
| return $properties; | |
| } | |
| add_filter( 'tribe_events_register_organizer_type_args', 'modify_organizer_type_properties' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Adjust the query to sort by "Attendee Information" on the tickets attendees page. | |
| * | |
| * Assumes attendee information is stored as post meta under 'attendee_info'. | |
| * | |
| * @param WP_Query $query The current WP_Query instance. | |
| */ | |
| function optimized_sort_attendee_column( $query ) { | |
| if ( | |
| is_admin() && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Force organizer post type slug to "ponent" | |
| function modify_organizer_type_properties($properties) | |
| { | |
| $properties["rewrite"] = [ | |
| "slug" => "ponent", | |
| "with_front" => false, // Optional: depends on your permalink settings | |
| ]; | |
| return $properties; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'save_post_tribe_events', function ( $post_id, $post, $update ) { | |
| // Ensure this is not an autosave | |
| if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) { | |
| return; | |
| } | |
| // Get the event's featured image | |
| $event_thumbnail_id = get_post_thumbnail_id( $post_id ); | |
| error_log('Event ID: ' . $post_id . ' - Thumbnail ID: ' . $event_thumbnail_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Patch the PayPal Client request() method to capture arguments once | |
| * and avoid re-capturing them on retry. | |
| * | |
| * Requires the runkit or runkit7 extension. | |
| */ | |
| add_action( 'plugins_loaded', function() { | |
| if ( ! function_exists( 'runkit_method_redefine' ) ) { | |
| error_log( 'Runkit extension is not available; PayPal Client patch was not applied.' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * View: List View - Single Event Date | |
| * | |
| * Override this template in your own theme by creating a file at: | |
| * [your-theme]/tribe/events/v2/list/event/date.php | |
| * | |
| * See more documentation about our views templating system. | |
| * | |
| * @link http://evnt.is/1aiy |