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_action( 'wp_head', 'community_limit_minutes' ); | |
function community_limit_minutes() { | |
if ( tribe_is_community_edit_event_page() ) { | |
?> | |
<style> | |
select[name='EventStartMinute'] option, select[name='EventEndMinute'] option {display:none !important;} | |
select[name='EventStartMinute'] option[value='00'], select[name='EventStartMinute'] option[value='30'], select[name='EventEndMinute'] option[value='00'], select[name='EventEndMinute'] option[value='30'] {display:inline !important;} | |
</style> | |
<?php | |
} |
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_ce_submit_event_page_title', 'change_community_title' ); | |
function change_community_title() { | |
return 'My Custom Title'; | |
} |
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( 'style_loader_tag', 'tribe_add_screen_to_mobile_css', 100, 2); | |
function tribe_add_screen_to_mobile_css( $style_tag ) { | |
//Grab style tag as XML element | |
$customXML = new SimpleXMLElement($style_tag); | |
$id = (string)$customXML->attributes()->id; | |
//If adding the mobile stylesheet | |
if ( $id == 'tribe-events-calendar-mobile-style-css' || $id == 'tribe-events-calendar-full-mobile-style-css' || $id == 'tribe-events-calendar-full-pro-mobile-style-css' || $id == 'tribe-events-calendar-pro-mobile-style-css' ) { | |
$media = (string)$customXML->attributes()->media; |
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_get_event_website_link', 'add_no_follow_event_website', 10, 2); | |
function add_no_follow_event_website( $html ) { | |
//Strip out HTML | |
$url = strip_tags( $html ); | |
//Add nofollow attribute | |
return sprintf( '<a href="%1$s" rel="nofollow" target="_self">%1$s</a>', $url ); | |
} |
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_filter_values', 'display_only_event_tags', 10, 2); | |
function display_only_event_tags( $values, $slug ) { | |
$tags_to_keep = array( 'testing', 'event' ); | |
if( $slug == 'tags' ) { | |
foreach ( $values as $i => $tag ) { | |
if ( !in_array( $tag['name'], $tags_to_keep ) ) { | |
unset ( $values[$i] ); | |
} |
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
<?php | |
add_filter( 'tribe_events_filter_values', 'tribe_filter_event_categories', 10, 2 ); | |
function tribe_filter_event_categories( $values, $slug ) { | |
if ( $slug == 'eventcategory' ) { | |
foreach ( $values as $i => $category ) { | |
if ( $category['name'] == 'Event Category 1' ) { | |
unset ( $values[$i] ); | |
break; | |
} |
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_filter_values', 'display_only_event_tags', 10, 2); | |
function display_only_event_tags( $values, $slug ) { | |
$tags_to_remove = array( 'testing', 'event' ); | |
if( $slug == 'tags' ) { | |
foreach ( $values as $i => $tag ) { | |
if ( in_array( $tag['name'], $tags_to_remove ) ) { | |
unset ( $values[$i] ); | |
} |
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('gettext', 'change_tickets_text', 10, 3); | |
function change_tickets_text( $translations, $text, $domain ) { | |
// Match the text you want you want to translate, preferably also match the text domain | |
if( $domain === 'tribe-wootickets' ) { | |
// The custom text you want instead | |
$text = str_ireplace( "Tickets", "Workshops", $text ); | |
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_venue_label_singular', 'change_single_venue_label' ); | |
function change_single_venue_label() { | |
return 'Church'; | |
} | |
add_filter('tribe_venue_label_plural', 'change_plural_venue_label' ); | |
function change_plural_venue_label() { | |
return 'Churches'; | |
} |
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_get_venue', 'remove_link', 100, 1 ); | |
add_filter( 'tribe_get_organizer', 'remove_link', 100, 1 ); | |
function remove_link( $string ) { | |
return strip_tags( $string ); | |
} |