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 | |
/** | |
* Gravity Wiz // Gravity Forms // Advanced Conditional Logic | |
* | |
* PLEASE NOTE: This snippet is a proof-of-concept. It is not supported and we have no plans to improve it. | |
* | |
* Allows multiple groups of conditional logic per field. | |
* | |
* @version 0.1 | |
* @author David Smith <[email protected]> |
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 | |
/** | |
* Unenqueue Tribe Scripts and replace with custom ones | |
* | |
* Tested with Events Calendar PRO 4.4.22 | |
*/ | |
// Unload isotope and photo view js for shortcode | |
add_action( 'tribe_events_pro_tribe_events_shortcode_prepare_photo', function() { | |
// Dequeue ECP's copy of isotope |
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
/** | |
* The Events Calendar - Target a Specific Event List Widget to Only Show Todays 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' ); | |
$start_date_end = $start_date_init . ' 23:59:59'; |
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
// Customize Events Community Datepicker | |
if($("div.tribe-community-events-date input.datepicker").length) { | |
var datepickerOpts = { | |
dateFormat: 'yy-mm-dd', | |
changeMonth: true, | |
changeYear: true, | |
onSelect: function(selectedDate) { | |
var option = this.id == "EventStartDate" ? "minDate" : "maxDate"; | |
var instance = $(this).data("datepicker"); | |
var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); |
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
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; |
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
/*-----------------------------------------------------------------------------------*/ | |
/* Adds new body classes | |
/*-----------------------------------------------------------------------------------*/ | |
add_filter('body_class', 'add_browser_classes'); | |
function add_browser_classes($classes){ | |
if(is_singular()) { | |
global $post; | |
$classes[] = $post->post_name; | |
} |
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 | |
/** | |
* update ~line 26 to include 2 argument params as such: | |
*/ | |
add_filter( 'posts_orderby', array( __CLASS__, 'events_search_orderby' ), 10, 2 ); | |
/** | |
* update static function `events_search_orderby` (replace with the following method starting at ~line 159) | |
*/ |
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 | |
/** | |
* Export WordPress post data to CSV | |
* Based on <http://stackoverflow.com/a/3474698> and <http://ran.ge/2009/10/27/howto-create-stream-csv-php/> | |
*/ | |
/** | |
********************************************************************* | |
* Configuration | |
********************************************************************* |
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
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
} elseif( tribe_is_event() && is_single() ) { // Single Events | |
} elseif( tribe_is_day() ) { // Single Event Days | |
NewerOlder