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 | |
/** | |
* This function changes the label "Website:" to "Online Registration:". | |
*/ | |
function tribe_change_url_text ( $translation, $text, $domain ) { | |
$custom_text = array( | |
'Website:' => 'Online Registration:' | |
); | |
if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_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
<?php | |
/** | |
* This snippet changes the default start and end times for both The Events Calendar and Community Events. | |
*/ | |
function new_default_time( $default, $type ) { | |
if ( 'start' === $type ) { | |
return '09:00'; | |
} elseif ( 'end' === $type ) { | |
return '22:00'; | |
} |
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 | |
// Change the required fields in the Community Events form. This code is setting only the Event Title | |
// as a required field in the submission form. You can customize it the way you want. | |
// You will find the default event fields in the following link: | |
// https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/#default-fields | |
add_action( 'tribe_events_community_required_fields', 'my_community_required_fields' ); | |
function my_community_required_fields( $required_fields ) { |
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 | |
// Do not load directly. | |
if ( ! defined( 'ABSPATH' ) ) { | |
die( '-1' ); | |
} | |
if ( class_exists( 'Tribe__Extension__Settings_Helper' ) ) { | |
return; | |
} | |
/** | |
* Helper for inserting/removing fields on the WP Admin Tribe Settings pages |
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
//This snippet sets the Organizer's name, e-mail and phone fields as required in Community Events Submission Form | |
add_filter( 'tribe_events_community_required_fields', 'require_organizer' ); | |
function require_organizer( $fields ) { | |
if ( ! is_array( $fields ) ) { | |
return $fields; | |
} | |
$fields[] = 'organizer'; | |
return $fields; |
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 | |
/** | |
* Removes the iCal and Google cal links from the single event page | |
*/ | |
add_action( 'init', 'tribe_remove_single_calendar_links' ); | |
function tribe_remove_single_calendar_links() { | |
if ( function_exists( 'tribe' ) ) { | |
remove_action( 'tribe_events_single_event_after_the_content', array( tribe( 'tec.iCal' ), 'single_event_links' ) ); | |
} |
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_community_section_before_organizer', 'add_text_organizer'); | |
function add_text_organizer() { | |
echo '<div class="tribe-section-content"><h2>(click for full list)</h2></div>'; | |
} |
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
/* Tribe, add support for post categories */ | |
add_filter('tribe_events_register_event_type_args', 'change_event_type_args'); | |
function change_event_type_args ( $args ) { | |
$args['taxonomies'][] = 'category'; | |
return $args; | |
} |
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 | |
// Don't load directly | |
defined( 'WPINC' ) or die; | |
/** | |
* My Events Column for Category Display | |
* | |
* Override this template in your own theme by creating a file at | |
* [your-theme]/tribe-events/community/columns/category.php | |
* |
OlderNewer