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: Force SSL URL Scheme | |
Plugin URI: https://gist.github.com/cliffordp/6378826 | |
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work. Recommended to me by Jason Cohen of WP Engine on 2013-08-28. | |
Version: 1.0.0 | |
Author: WebAware | |
Author URI: http://www.webaware.com.au/ | |
*/ |
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 | |
/** | |
* Range Control Class | |
*/ | |
class WP_Customize_Range_Control extends WP_Customize_Control { | |
/** | |
* @access public | |
* @var string |
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
SELECT DATE_FORMAT( a.meta_value, '%Y-%m-%d' ) as Completed_Date, /* 2015-01-01 date format */ | |
b.meta_value as Email, | |
wp_woocommerce_order_items.order_item_name as Product, | |
c.meta_key as Variation_Type, | |
c.meta_value as Variation_Name | |
FROM wp_woocommerce_order_items | |
left join wp_postmeta a ON wp_woocommerce_order_items.order_id = a.post_id AND a.meta_key = '_completed_date' | |
left join wp_postmeta b ON wp_woocommerce_order_items.order_id = b.post_id AND b.meta_key = '_billing_email' | |
left join wp_woocommerce_order_itemmeta c ON wp_woocommerce_order_items.order_item_id = c.order_item_id AND c.meta_key NOT LIKE '\_%' /* escape the underscore wildcard character -- get keys not starting with underscore */ | |
WHERE wp_woocommerce_order_items.order_item_id IN ( |
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 | |
// From https://gist.github.com/cliffordp/ab1f7c4d95723ee6f892/, a fork of https://gist.github.com/jesseeproductions/2b1af6527b7029eaea6e | |
// References: | |
// https://theeventscalendar.com/support/forums/topic/ical-only-pushing-1-month-at-a-time/ | |
// https://theeventscalendar.com/support/forums/topic/how-users-can-subscribe-to-my-events-calendar-in-their-personal-calendars/#post-1022932 | |
// https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/3777092-subscribe-to-calendar-via-ical | |
/* | |
* The Events Calendar Get Events for 1 Year from Today in iCal Export File | |
* add coding to child theme's functions.php | |
* Tested works with The Events Calendar v3.12 and v4.0 |
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 | |
/* | |
* The Events Calendar - Limit the upcoming widget to just event running today | |
*/ | |
add_filter( 'tribe_events_list_widget_query_args', 'tribe_modify_list_widget_args', 10, 1 ); | |
function tribe_modify_list_widget_args ( $args ) { | |
$start_date_init = date ( 'Y-m-d' ); | |
$start_date_end = $start_date_init . ' 23:59:59'; |
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 | |
/** | |
* The Events Calendar - Target a Specific Event List Widget to Only Show Today's Events | |
* | |
* modify tribe-events-adv-list-widget-2 to id of widget | |
*/ | |
function tribe_modify_list_widget_args_for_today( $args ) { | |
$start_date_init = date ( 'Y-m-d' ); |
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
/* | |
* Events Tickets Plus - WooCommerce Tickets - Prevent Ticket Email from being sent. | |
* @ Version 4.0 | |
*/ | |
add_action( 'init', 'wootickets_stop_sending_email' ); | |
function wootickets_stop_sending_email() { | |
if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) { | |
$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) ); | |
add_action( 'woocommerce_email_after_order_table', array( $woo, 'add_tickets_msg_to_email' ) ); |
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 | |
/* | |
* Set the default date for views like List and Month | |
*/ | |
function tribe_set_default_date () { | |
if ( !is_single() && empty( $_REQUEST['tribe-bar-date'] ) ) { | |
$_REQUEST['tribe-bar-date'] = '2000-01-01'; | |
} | |
} |
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 | |
// Singular | |
add_filter( 'tribe_event_label_singular', 'event_display_name' ); | |
function event_display_name() { | |
return 'Meeting'; | |
} | |
add_filter( 'tribe_event_label_singular_lowercase', 'event_display_name_lowercase' ); | |
function event_display_name_lowercase() { | |
return 'meeting'; |
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 | |
/* | |
* Removes categories "meetup" and "shindig" from list and month views | |
*/ | |
function tribe_exclude_events_category( $wp_query ) { | |
// Slugs for the categories you wish to hide | |
$exclude_cats = array('meetup', 'shindig'); |
OlderNewer