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
| // Removes the passed event notice for events in a speicifc category | |
| add_filter( 'tribe_the_notices', 'customize_notice', 10, 2 ); | |
| function customize_notice( $html, $notices ) { | |
| // If text is found in notice, then replace it | |
| if (tribe_event_in_category('formation-sur-demande') && stristr( $html, 'This event has passed.' ) ) { | |
| // Customize the message as needed | |
| $html = str_replace( '', $html ); | |
| } | |
| return $html; |
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_filter('tribe_events_before_html', 'tribe_custom_commmunity_content'); | |
| function tribe_custom_commmunity_content() { | |
| // We'll add content to the Community Events header only | |
| if ( tribe_is_community_my_events_page() ) | |
| return '<p>Your custom content here!</p>'; | |
| } |
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 | |
| /** | |
| * Renders the WooCommerce tickets table/form | |
| * | |
| * @version 4.1 | |
| * | |
| */ | |
| /** | |
| * @var bool $global_stock_enabled |
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_filter('tribe_events_before_html', 'tribe_custom_commmunity_content'); | |
| function tribe_custom_commmunity_content() { | |
| // We'll add content to the Community Events header only | |
| if ( tribe_is_community_edit_event_page() ) | |
| return '<p>Your custom content here!</p>'; | |
| } |
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 custom content before all the calendar views, ignore single event view | |
| add_action( 'tribe_events_before_html', 'output_custom_code' ); | |
| function output_custom_code() { | |
| // Check if displaying full month view | |
| if( tribe_is_month() ) { | |
| echo 'Your custom code to display.'; | |
| } | |
| } |
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 | |
| /** | |
| * Events Pro List Widget Template | |
| * This is the template for the output of the events list widget. | |
| * All the items are turned on and off through the widget admin. | |
| * There is currently no default styling, which is highly needed. | |
| * | |
| * Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/widgets/list-widget.php | |
| * | |
| * When the template is loaded, the following vars are set: |
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 custom content before all the calendar views, ignore single event view | |
| add_action( 'tribe_events_before_html', 'output_custom_code' ); | |
| function output_custom_code() { | |
| // Check if displaying a full calendar view | |
| if( ! is_single() ) { | |
| echo 'Your custom code to display.'; | |
| } | |
| } |
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
| if ( function_exists( 'tribe_is_event') ) { | |
| /** | |
| * Modifying the thumbnail arguments in Month view tooltip from a filter. | |
| * | |
| * @link https://theeventscalendar.com/support/forums/topic/month-view-tooltip-image-size/ | |
| * @return array | |
| */ | |
| function change_tribe_json_tooltip_thumbnail( $json ) { | |
| $event_id = get_the_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
| // Changes listed event views to reverse chronological order | |
| function tribe_past_reverse_chronological ($post_object) { | |
| $past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'upcoming') ? true : false; | |
| if(tribe_is_past() || tribe_is_upcoming() || $past_ajax) { | |
| $post_object = array_reverse($post_object); | |
| } | |
| return $post_object; | |
| } | |
| add_filter('the_posts', 'tribe_past_reverse_chronological', 100); |
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 | |
| /** | |
| * Default Events Template | |
| * This file is the basic wrapper template for all the views if 'Default Events Template' | |
| * is selected in Events -> Settings -> Template -> Events Template. | |
| * | |
| * Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php | |
| * | |
| * @package TribeEventsCalendar | |
| * |