This file contains 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_the_notices', 'customize_notice', 10, 2 ); | |
function customize_notice( $html, $notices ) { | |
//If text is found in notice, then replace it | |
if( stristr( $html, 'This event has passed.' ) ) { | |
//Customize the message as needed | |
$html = str_replace( 'This event has passed.', 'This event has passed and <a href="">add a link</a>.', $html ); | |
} | |
return $html; | |
} |
This file contains 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_community_events_form_errors', 'customize_thank_you_message', 10, 2); | |
function customize_thank_you_message( $messages ) { | |
if ( is_array( $messages ) ) { | |
foreach ( $messages as $key => $message ) { | |
if( $message['type'] === 'update' ) { | |
$messages[$key]['message'] = 'Thanks for submitting your event! You can add other helpful information or HTML here also.'; | |
} | |
} |
This file contains 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_community_events_event_categories', 'remove_community_categories' ); | |
function remove_community_categories( $cats ) { | |
//Category IDs to exclude | |
$excluded_cat_ids = array(4,12); | |
foreach ($cats as $key => $single_cat) { | |
//If item is found in array, then remove it | |
if( in_array( $single_cat->term_id, $excluded_cat_ids ) ) { | |
unset( $cats[$key] ); |
This file contains 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
// disable comment feeds for individual events | |
function disableEventsCommentsFeedLink( $for_comments ) { | |
if( tribe_is_event() ) | |
return; | |
} | |
add_filter('post_comments_feed_link','disableEventsCommentsFeedLink'); |
This file contains 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_event_schedule_details_formatting', 'change_schedule_formatting'); | |
function change_schedule_formatting( array $format ) { | |
$format['show_end_time'] = false; // This removes the end time | |
return $format; | |
} |
This file contains 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
// See the codex to learn more about WP text domains: | |
// http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
// Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
add_filter('gettext', 'theme_filter_text', 10, 3); | |
function theme_filter_text( $translations, $text, $domain ) { | |
// Copy and modify the following if {} statement to replace multiple blocks of text | |
// Match the text you want you want to translate, preferably also match the text domain |
This file contains 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 hide_event_organizer_meta(){ | |
tribe_set_the_meta_visibility( 'tribe_event_organizer', false, 'meta_group' ); | |
} |
This file contains 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 filter_translations($translations, $text, $domain) { | |
if ($domain == 'tribe-events-community' || $domain == 'tribe-events-calendar') { | |
$text = str_ireplace( 'Organizer', 'Coordinator', $text ); | |
} | |
return $text; | |
} | |
add_filter('gettext', 'filter_translations', 10, 3); |
This file contains 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_the_previous_month_link', 'change_prev_link', 10, 3); | |
function change_prev_link( $html ) { | |
//Do some code to transform the HTML Here | |
//Return the transformed HTML to be displayed | |
return $html; | |
} |
This file contains 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
// See the codex to learn more about WP text domains: | |
// http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
// Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
add_filter('gettext', 'theme_filter_text', 10, 3); | |
function theme_filter_text( $translations, $text, $domain ) { | |
// Copy and modify the following if {} statement to replace multiple blocks of text | |
// Match the text you want you want to translate, preferably also match the text domain |