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_action( 'rest_api_init', function() { | |
register_rest_route( 'protected-url/v1', '/rcp/addon/(?P<slug>.+)', [ | |
'methods' => 'GET', | |
'callback' => 'rcp_protected_url', | |
'permission_callback' => '__return_true', // We will do the permission checking in the rcp_protected_url function so we can redirect. | |
] ); | |
} ); | |
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 | |
/** | |
* Get event cost description. | |
* | |
* @param $post_id - post id or post object. | |
* @return string | |
*/ | |
function get_cost_description( int $post_id = 0 ) { | |
$post = get_post( $post_id ); |
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 | |
/** | |
* Plugin Name: Fix for TEC datepicker conflict. | |
* Description: Fixes conflict between bootstrap datepicker and jQuery UI datepicker | |
* Author: theeventscalendar.com | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
// Basic security, prevents file from being loaded directly. |
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 | |
/** | |
* Fix Calendar views in Genesis based themes. | |
* | |
* This snippet overrides the Genesis Content Archive settings for Event Views | |
* when Events > Settings > Display Tab > Events template is set to Default Page Template. | |
* | |
*/ | |
add_action( 'get_header', function() { | |
if ( ! class_exists( 'Tribe__Events__Main' ) ) { |
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 | |
// Remove subscribe to calendar dropdown from main calendar page | |
add_filter( 'tribe_template_html:events/v2/components/subscribe-links/list', '__return_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 | |
// Prevent RSVPs from being sent | |
add_filter( 'tribe_tickets_rsvp_tickets_to_send', '__return_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 | |
add_action( 'woocommerce_thankyou', function( $order_id ){ | |
$order = wc_get_order( $order_id ); | |
$has_tickets = get_post_meta( $order_id, '_tribe_has_tickets', true ); | |
if ( empty( $has_tickets ) || ! $has_tickets ) { | |
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 | |
// Remove actions related to attendee info in WooCommerce pages | |
add_action( 'init', function() { | |
// Remove action to add attendee meta on completed order page | |
remove_action( 'woocommerce_before_order_itemmeta', tribe_callback( 'tickets-plus.woo.enhanced-template-hooks', 'add_attendee_data_for_order_item' ) ); | |
// Remove action to add "event" table heading from "Item" metabox on Woo order page | |
remove_action( 'woocommerce_admin_order_item_headers', tribe_callback( 'tickets-plus.woo.enhanced-template-hooks', 'add_event_title_header' ) ); |
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 | |
/** | |
* View: Month View - Day | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe/events/v2/month/calendar-body/day.php | |
* | |
* See more documentation about our views templating system. | |
* | |
* @link http://evnt.is/1aiy |
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_template_context', function($context, $file, $name, $obj){ | |
// bail if not the target template | |
if ( 'v2/tickets' !== implode("/", $name) ) { | |
return $context; | |
} | |
// This is the name of a category added to members only products in WooCommerce. |
NewerOlder