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 | |
/* | |
* Prevents Tribe Thanks for Updating page from automatically displaying | |
*/ | |
function tribe_remove_activation_page() { | |
if ( class_exists( 'Tribe__Events__Activation_Page' ) ) { | |
remove_action( 'admin_init', array( Tribe__Events__Activation_Page::instance(), 'maybe_redirect' ), 10, 0 ); | |
} |
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 | |
/* | |
* Prevent Day view URLs from being indexed by search engines | |
*/ | |
function tribe_noindex_day_view () { | |
if ( tribe_is_day()) { | |
echo ' <meta name="robots" content="noindex,follow" />' . "\n"; | |
} | |
} |
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 | |
/* | |
* Gets the amount of tickets sold for an event, currently only works with WooCommerce Tickets | |
*/ | |
if ( !function_exists('tribe_events_count_sold_tickets') ) { | |
function tribe_events_count_sold_tickets ( $event = null ) { | |
$count = 0; | |
if ( null === $event = tribe_events_get_event( $event ) || !class_exists('TribeEventsTickets') ) { |
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 if ( date_i18n( 'Y-m-01' ) !== tribe_get_month_view_date() ) : ?> | |
<li class="tribe-events-nav-current"> | |
<a href="<?php echo Tribe__Events__Main::instance()->getLink( 'month' ) ?>">Back to Current Month</a> | |
</li> | |
<?php endif ?> |
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 | |
/** | |
* Tries to force the minicalendar widget to show the month of the next upcoming event by default, rather | |
* than simply showing the current month (which might be empty). | |
*/ | |
class Tribe_Advance_Minical | |
{ | |
protected $target_date = false; | |
/** |
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 | |
/* | |
* SWAPS OUT USAGES OF "KICK ASS" WITH A DIFFERENT WORD | |
* 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'... | |
*/ | |
function tribe_kick_ass_eraser ( $translations, $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
<?php | |
/* | |
* This will override the default country selected when adding events | |
* If you want a frienly GUI for selecting all Venue/Organizer defaults, look at PRO's Default Settings Feature. | |
* https://theeventscalendar.com/product/wordpress-events-calendar-pro/ | |
*/ | |
class Tribe__Events__Default_Values_Override extends Tribe__Events__Default_Values { | |
public function country() { | |
return array('GB', 'United Kingdom'); |
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 | |
/* | |
* Hide Tribe Events After HTML content on select pages | |
* Find "Tribe Events After HTML" field in WP Admin > Events > Settings > Display | |
* IMPORTANT: Uncomment the pages you wish to hide the form on, else this does nothing. | |
*/ | |
function tribe_after_html_hider ( $html ) { | |
// Uncomment to hide "after HTML" on the single event 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
<?php | |
/* | |
* The Events Calendar - Add iCal Link Below Month View | |
*/ | |
function tribe_add_month_ical() { | |
if ( tribe_is_month() ) { | |
echo '<div class="tribe-events-cal-links">'; | |
echo '<a class="tribe-events-ical tribe-events-button" title="Use this to share calendar data with Google Calendar, Apple iCal and other compatible apps" href="' . esc_url( tribe_get_ical_link() ) . '">+ Export Month\'s Events</a>'; | |
echo '</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
<?php | |
/* | |
* Prevents iCal importer from saving a copy of "deleted" events | |
* This means when you rerun an import, it will reimport any events you previously deleted | |
*/ | |
function tribe_ical_dont_save_deleted () { | |
$ical_importer = Tribe__Events__Ical_Importer__Main::instance(); | |
remove_action( 'before_delete_post', array( $ical_importer, 'deletedEventSave' ) ); | |
} |