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 |
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 the custom 'has_tickets' field to the list of required fields | |
| add_filter( 'tribe_events_community_required_fields', function( $fields ) { | |
| // Add our custom field identifier to the required fields array | |
| $fields[] = 'has_tickets'; | |
| return $fields; | |
| } ); | |
| // Validate the 'has_tickets' field during event submission | |
| add_filter( 'tribe_community_events_validate_submission', function( $valid, $event_id, $args ) { | |
| // Check if the current user is an admin; if so, skip validation |
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 |
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
| 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 | |
| // 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
| /** | |
| * 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
| // 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
| 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' ); |