This file contains hidden or 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 json LD from loading on month view | |
*/ | |
function tribe_run_on_init( ) { | |
global $wp_filter; | |
if( tribe_is_month() ) { |
This file contains hidden or 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 | |
/* | |
* Deletes the saved copy of "deleted" events generated by iCal Importer | |
* This allows you to re-import events. The script deletes 50 instances per page load | |
* Code by Nico; enhancement by Andras | |
*/ | |
function del_deleted_events () { | |
$posts = get_posts( array( 'post_type'=>'deleted_event', "posts_per_page" => 50, 'post_status' => 'trash', ) ); | |
if (!empty($posts)) { | |
foreach ($posts as $post) { |
This file contains hidden or 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 | |
/* | |
* Deletes the saved copy of "deleted" events generated by iCal Importer | |
* This allows you to re-import events. The script deletes 50 instances per page load | |
* Code by Nico; enhancement by Andras | |
*/ | |
function del_deleted_events () { | |
$posts = get_posts( array( 'post_type'=>'deleted_event', "posts_per_page" => 50, 'post_status' => 'trash', ) ); | |
if (!empty($posts)) { | |
foreach ($posts as $post) { |
This file contains hidden or 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 | |
/** | |
* Adds ticketed event information to WooCommerce "order confirmation" emails. | |
* | |
* @param object $order | |
* @param bool $sent_to_admin | |
* @return void | |
*/ | |
function add_attending_events_above_woo_order_info( $order, $sent_to_admin ) { | |
$line_items = $order->get_items( apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) ); |
This file contains hidden or 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 | |
/* Force the use of the cost field of event and ignore tickets price */ | |
function tribe_just_show_price_field ( $cost, $post_id, $with_currency_symbol ) { | |
$cost_utils = Tribe__Events__Cost_Utils::instance(); | |
$cost = tribe_get_event_meta( $post_id, '_EventCost' ); | |
if ( $with_currency_symbol ) { | |
$cost = $cost_utils->maybe_format_with_currency( $cost ); |
This file contains hidden or 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 SQL Query will delete all recurrences of an event, while preserving the | |
original event. It can delete many thousands of recurrences per second on most | |
servers. | |
The query and steps below is modified version of that in this tutorial: | |
http://wpguru.co.uk/2013/02/how-to-bulk-delete-posts-in-wordpress-with-mysql/ | |
It is recommended that you read the source article above before proceeding. | |
Step 1) Grab the "post_parent" ID for your recurring series of events. Navigate |
This file contains hidden or 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 | |
function change_rsvp_label() { ?> | |
<script> | |
jQuery(document).ready( function ( ){ | |
jQuery('input[value="Tribe__Tickets__RSVP"]').next().html('Free Tickets'); | |
This file contains hidden or 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 | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" | |
$custom_text = array( | |
'Events' => 'Bananas', | |
'Event' => 'Banana', |
This file contains hidden or 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: ET Meta Hawk | |
* Description: Lets site administrators soar over meta data supplied by attendees then swoop down, hawk-like, to change it. Proof of concept targeting the WooCommerce provider. | |
* Version: 2016-03-21 | |
* | |
* Experiment in making attendee meta editable via the attendee screen. | |
* Well worth bearing in mind that: | |
* | |
* - It currently won't work for RSVP or providers besides WooCommerce |
This file contains hidden or 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 Pro - Hide Mini Calendar Event List Until Calendar Date is Clicked | |
* TEC PRO @3.11.1 | |
*/ | |
add_action( 'wp_footer', 'tribe_hide_mini_calendar_list_until_clicked', 50 ); | |
function tribe_hide_mini_calendar_list_until_clicked() { | |
?> | |
<script> | |
var $ = jQuery.noConflict(); |