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 you already have something in your functions.php, please remove these first few lines | |
*/ | |
function tec_forum_939516( $json, $event, $additional ){ | |
$venue = tribe_get_venue_id( $event ); | |
if ( $venue ){ | |
$json['venue'] = $venue; |
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 | |
/** | |
* How to link into the WordPress Customizer | |
* @link https://www.slushman.com/how-to-link-to-the-customizer/ | |
*/ | |
?> | |
Simple Link: | |
<a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>">Link to Customizer</a> |
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 | |
/* | |
* Hides QR codes from the Email/Tickets sent to purchasers | |
* No longer needed as of https://theeventscalendar.com/maintenance-release-for-the-week-of-27-may-2018/ | |
*/ | |
function tribe_neuter_qr () { | |
if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) { | |
$qr_class = Tribe__Tickets_Plus__Main::instance()->qr(); | |
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr_class, 'inject_qr' ) ); |
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
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' |
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 | |
/** | |
* Causes calendar to always show Google Map and Link, regardless of individual Event's or Venue's settings | |
* | |
* @link https://gist.github.com/cliffordp/d420a5f952ef3b91e6db2b4104b6f28b | |
* | |
* @see Tribe__Events__Main::tribe_embed_google_map() | |
* @see Tribe__Events__Main::tribe_show_google_map_link() | |
*/ |
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 | |
/* | |
* Causes WooCommerce Ticket product pages to stop redirecting to their event page | |
* See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
*/ | |
function tribe_wootix_no_hijack() { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
$woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
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
// Removes the passed event notice for events in a speicifc category | |
add_filter( 'tribe_the_notices', 'customize_notice', 10, 2 ); | |
function customize_notice( $html, $notices ) { | |
// If text is found in notice, then replace it | |
if (tribe_event_in_category('formation-sur-demande') && stristr( $html, 'This event has passed.' ) ) { | |
// Customize the message as needed | |
$html = str_replace( '', $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_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 is gone but will not be forgotten.', $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
<?php | |
/** | |
* Modify the "bases" used to form event URLs for various views. | |
* | |
* @param array $bases | |
* | |
* @return array | |
*/ | |
function rename_event_view_slugs( $bases ) { | |
if ( isset( $bases['month'] ) ) $bases['month'] = [ 'calendar', 'calendar' ]; |