Skip to content

Instantly share code, notes, and snippets.

@geoffgraham
geoffgraham / example.php
Last active January 12, 2016 16:44
The Events Calendar 4.0.4 // Use full size thumbnail in Month View tooltip
if ( function_exists( 'tribe_is_event') ) {
/**
* Modifying the thumbnail arguments in Month view tooltip from a filter.
*
* @link https://theeventscalendar.com/support/forums/topic/month-view-tooltip-image-size/
* @return array
*/
function change_tribe_json_tooltip_thumbnail( $json ) {
$event_id = get_the_ID();
@geoffgraham
geoffgraham / tribe-support-1038901.php
Last active December 21, 2015 21:50
The Events Calendar 4.0.2 // Add HTML to Excerpts
<?php
/**
* Plugin Name: The Events Calendar: Add HTML to Excerpts
* Plugin URI: http://theeventscalendar.com
* Description: Ensure that allowed HTML is preserved in Events Calendar tooltips.
* Version: 0.0.1
* Author: Modern Tribe
*
* @link http://theeventscalendar.com/?p=1038901
*/
@geoffgraham
geoffgraham / gist:3f3e25f88856cb6c51cf
Last active October 29, 2015 19:34 — forked from jazbek/gist:7442734
Fix for broken tag archives
add_action( 'parse_query', 'tribe_fix_tag_query' );
function tribe_fix_tag_query( $query ) {
if ( $query->is_tag && (array) $query->get( 'post_type' ) != array( Tribe__Events::POSTTYPE ) ) {
if ( empty( $query->query_vars['post_type'] ) ) {
$query->query_vars['post_type'] = array( 'post' );
}
if ( ! ( $query->query_vars['post_type'] == array( 'post' ) || $query->query_vars == 'post' ) ) {
remove_action( 'parse_query', array( 'Tribe__Events__Query', 'parse_query' ), 50 );
remove_action( 'pre_get_posts', array( 'Tribe__Events__Query', 'pre_get_posts' ), 50 );
}
@geoffgraham
geoffgraham / single-event.php
Last active September 14, 2015 15:57 — forked from anonymous/single-event.php
The Events Calendar PRO 3.12 // Replace PRO List Widget date icons with starting date rather than current date
<?php
/**
* Single Event Template for Widgets
*
* This template is used to render single events for both the calendar and advanced
* list widgets, facilitating a common appearance for each as standard.
*
* You can override this template in your own theme by creating a file at
* [your-theme]/tribe-events/pro/widgets/modules/single-event.php
*