Skip to content

Instantly share code, notes, and snippets.

@niconerd-zz
niconerd-zz / example.php
Last active April 9, 2019 21:35 — forked from skyshab/example.php
Add organizer email to ticket emails
<?php
function modify_woo_ticket_headers( $header, $id, $object ) {
remove_filter( 'woocommerce_email_headers', 'modify_woo_ticket_headers' );
$organizer_email = tribe_get_organizer_email( $id, false );
// add organizer email if it's a valid email address
if ( is_email( $organizer_email ) ) {
$header .= "Cc: " . $organizer_email . "\r\n";
}
@niconerd-zz
niconerd-zz / tribe_etp_move_tickets_purchase_form.php
Created April 7, 2016 15:02 — forked from elimn/tribe_et_move_tickets_purchase_form.php
MT | ETP | Move the front-end ticket purchase form
<?php
/*
* Moves the front-end ticket purchase form, accepts WP action/hook and optional hook priority
*
* @param $ticket_location_action WP Action/hook to display the ticket form at
* @param $ticket_location_priority Priority for the WP Action
*/
function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
if ( ! class_exists( 'Tribe__Tickets__Tickets') ) return;
<?php
/**
* Ensure that allowed HTML is preserved in Events Calendar tooltips.
*
* @link http://theeventscalendar.com/?p=1038901
*/
add_filter( 'wp_trim_words', 'tribe_support_1038901', 10, 4 );
function tribe_support_1038901( $text, $num_words, $more, $original_text ) {
@niconerd-zz
niconerd-zz / remove-categories-not-replated.php
Last active December 23, 2015 20:29 — forked from jesseeproductions/remove-categories-not-replated.php
Removes categories "tech" from list, day and month views
/*
* The Events Calendar Remove Events from Month and List Views
* add coding to theme's functions.php
* @version 4.0
* modify here with event category slugs: array( 'concert', 'convention' )
*/
add_action( 'pre_get_posts', 'tribe_exclude_events_category_month_list' );
function tribe_exclude_events_category_month_list( $query ) {
if ( isset( $query->query_vars['eventDisplay'] ) && ! is_singular( 'tribe_events' ) && ! $query->tribe_is_event_category ) {