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 change_tribe_searchbar_search_placeholder_text( $filters ) { | |
$filters['tribe-bar-search']['html'] = '<input type="text" name="tribe-bar-search" id="tribe-bar-search" value="" placeholder="'. __('Find Events', 'tribe-events-calendar') .'">'; | |
return $filters; | |
} | |
add_filter( 'tribe-events-bar-filters', 'change_tribe_searchbar_search_placeholder_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
class UnlimitedICalFeed { | |
public static function setup() { | |
add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ), 75 ); | |
} | |
public static function pre_get_posts( WP_Query $query ) { | |
if ( ! $query->tribe_is_event_query ) return self::shutdown(); | |
if ( ! isset($_GET['ical'] ) || 'all' !== $_GET['ical'] ) return self::shutdown(); | |
$query->set( 'posts_per_page', -1 ); | |
} |
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
// Written by Barry Hughes of Modern Tribe | |
add_action( 'pre_get_posts', 'include_events_one_week_prior', 200 ); | |
function include_events_one_week_prior( $query ) { | |
// Avoid fatals if TEC is deactivated | |
if ( ! class_exists( 'TribeEvents' ) ) return; | |
// Is it an events query? | |
if ( $query->get( 'post_type' ) !== TribeEvents::POSTTYPE ) return; |
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 | |
/** | |
* Month Single Event | |
* This file contains one event in the month view | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/month/single-event.php | |
* | |
* @package TribeEventsCalendar | |
* @since 3.0 | |
* @author Modern Tribe Inc. |
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 anywhere in functions.php theme file | |
add_filter( 'tribe_events_list_the_date_headers', 'add_class_to_month_header' ); | |
function add_class_to_month_header( $content ) { | |
$my_class = 'this-is-my-class'; | |
$content = str_replace( 'tribe-events-list-separator-month', 'tribe-events-list-separator-month ' . $my_class, $content ); | |
return $content; | |
} |
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 to your active theme's functions.php | |
add_filter( 'tribe_community_events_form_errors', 'ce_custom_error_msg' ); | |
function ce_custom_error_msg( $errors ) { | |
// Don't filter if it is an 'update' or other type of message | |
if ( $errors[0]['type'] != 'error' ) return $errors; | |
$existing_errors = ''; | |
$type = 'error'; |
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 to functions.php | |
add_filter( 'tribe_community_events_form_errors', 'ce_custom_success_message' ); | |
function ce_custom_success_message( $messages ) { | |
if ( $messages[0]['type'] != 'update' ) return $messages; | |
$existing_messages = ''; | |
$type = 'update'; | |
if ( is_array( $messages ) ) { | |
$existing_messages = $messages[0]['message']; |
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 to functions.php of your active theme | |
add_filter( 'tribe_events_community_sanitize_submission', 'set_community_events_publication_status' ); | |
function set_community_events_publication_status( $submission ) { | |
// Escape, assuming default is set to 'draft' and 'allow anonymous submits' | |
if ( ! is_user_logged_in() ) return $submission; | |
$submission['post_status'] = 'publish'; | |
return $submission; | |
} |
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 to functions.php of your active theme | |
add_filter( 'tribe_events_community_sanitize_submission', 'set_community_events_publication_status' ); | |
function set_community_events_publication_status( $submission ) { | |
// Uncomment one of the lines below to change the default status | |
//$submission['post_status'] = 'publish'; | |
//$submission['post_status'] = 'pending'; | |
return $submission; | |
} |
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 ce_custom_error_msg( $errors ) { | |
// Don't filter if it is an 'update' or other type of message | |
if ( $errors[0]['type'] != 'error' ) return $errors; | |
$existing_errors = ''; | |
$type = 'error'; | |
if ( is_array( $errors ) ) { | |
$existing_errors = $errors[0]['message']; | |
$type = $errors[0]['type']; |
OlderNewer