Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
jesseeproductions / mu-loader.php
Created August 8, 2018 20:35
MU Loader for The Events Calendar and Events Calendar Pro
<?php
/*
Plugin Name: MU Plugin Loader
Description: Loads plugins in mu-plugins subdirectories
*/
include_once 'events-pro/events-calendar-pro.php';
include_once 'the-events-calendar/the-events-calendar.php';
@jesseeproductions
jesseeproductions / tribe-google-map-region
Created July 23, 2018 15:22
Set Region and Language for Google Maps
/**
* The Events Calendar - Set Region and Language for Google Maps
*
* Language Codes https://developers.google.com/maps/faq#languagesupport
* Region codes: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRegionCodes
*/
add_filter( 'tribe_events_google_maps_api', 'tribe_add_google_map_region' );
add_filter( 'tribe_events_pro_google_maps_api', 'tribe_add_google_map_region' );
function tribe_add_google_map_region( $api_url ) {
@jesseeproductions
jesseeproductions / cctor-pro-css-header.php
Created March 29, 2018 22:41
Load Coupon Creator Pro CSS in Header
add_action( 'wp_enqueue_scripts', 'cctor_enqueue_assets', 11 );
function cctor_enqueue_assets() {
if ( ! is_admin() ) {
// @formatter:off
wp_enqueue_style(
'coupon_creator_css',
Cctor__Coupon__Pro__Main::instance()->resource_url . 'css/coupon-pro.css',
array( 'pngx-font-awesome' ),
filemtime( Cctor__Coupon__Pro__Main::instance()->resource_path . 'css/coupon-pro.css' )
);
@jesseeproductions
jesseeproductions / list-view-start-tribe.php
Last active February 9, 2017 00:00
The Events Calendar List View Multi Day Events Show Today as the Start Date
<?php
/*
Plugin Name: A Snippet for List View Multi Day Events Start Time - The Events Calendar
Plugin URI: http://theeventscalendar.com
Description: This plugin changes the List View Start Times for Multiple Day Events.
Author: brianjessee
Version: 1.0
Author URI: http://theeventscalendar.com
*/
/**
@jesseeproductions
jesseeproductions / tribe-enable-shortcodes-excerpt.pjp
Created June 27, 2016 23:45
Tribe - Enable Shortcodes in Excerpt of List View
/**
* Tribe - Enable Shortcodes in Excerpt of List View
*/
add_filter('tribe_events_excerpt_allow_shortcode', 'tribe_events_excerpt_enable_shortcode' );
function tribe_events_excerpt_enable_shortcode( $args ) {
return true;
}
@jesseeproductions
jesseeproductions / tribe-filter-limits-org-ven.php
Last active June 22, 2016 12:39
Filter Limits for Filter Bar
/**
* Filter Limits for Filter Bar for The Events Calendar
* version 4.2.1
*/
add_filter('tribe_eventsfilter_bar_venues_limit', 'tribe_modify_filter_bar_venue_organzer_limits' );
add_filter('tribe_events_filter_bar_organizers_limit', 'tribe_modify_filter_bar_venue_organzer_limits' );
function tribe_modify_filter_bar_venue_organzer_limits( $limit ) {
$limit = -1;
@jesseeproductions
jesseeproductions / tribe-rest-endpoint.php
Last active November 16, 2016 19:10
The Events Calendar Basic Custom Query EndPoint Example
/**
* The Events Calendar Basic Custom Query EndPoint Example
*
* @param $data
*
* @return array|null
*
* Get Events from December 31st to January 20th - <a href="http://yoursite.org/wp-json/tribe_events/v2/events/custom/2015-12-31/2016-01-20" rel="nofollow">http://yoursite.org/wp-json/tribe_events/v2/events/custom/2015-12-31/2016-01-20</a>
*
* jQuery.get( "http://yoursite.org/wp-json/tribe_events/v2/events/custom/2015-12-31/2016-01-20", function( response ) {
@jesseeproductions
jesseeproductions / tec-month-view-filter.php
Created April 5, 2016 15:34
The Events Calendar - Add Content to Month View Only
/*
* The Events Calendar - Add Content to Month View Only
* @version 1.0
*/
add_filter( 'tribe_events_before_html', 'custom_events_before_html', 10 );
function custom_events_before_html( $tribe_events_before_html ) {
if ( tribe_is_month() ) {
$tribe_events_before_html .= 'To see Members Only Events, you must be a Member AND Logged In .';
@jesseeproductions
jesseeproductions / coupon-pro-show-url.php
Created April 3, 2016 17:53
Coupon Creator Pro - Show Url Under Expiration of Coupon
/**
* Coupon Creator Pro - Show Url Under Expiration of Coupon
*
*/
add_action('cctor_coupon_expiration', 'cctor_pro_show_url', 15, 1 );
add_action('cctor_print_coupon_expiration', 'cctor_pro_show_url', 15, 1 );
function cctor_pro_show_url($coupon_id) {
?>
<div class="cctor_url" style="<?php echo esc_attr($cctor_styles['cctor_coupon_terms_text_color']); ?>"><?php echo esc_url( get_the_permalink( $coupon_id ) ); ?></div>
@jesseeproductions
jesseeproductions / tickets-plus-disable-tax.php
Created March 2, 2016 13:51
Event Tickets Plus - Disable Taxes for Ticket Products
/**
* Event Tickets Plus - Disable Taxes for Ticket Products
*/
add_action( 'wootickets_after_save_ticket', 'tribe_disable_taxes_ticket_product' );
function tribe_disable_taxes_ticket_product( $ticket_id ) {
update_post_meta( $ticket_id, '_tax_status', 'none' );
update_post_meta( $ticket_id, '_tax_class', 'zero-rate' );
}