⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
/*-----------------------------------------------------------------------------------*/ | |
/* 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
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
// 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
adjust | |
adn | |
align-center | |
align-justify | |
align-left | |
align-right | |
ambulance | |
anchor | |
android | |
angle-down |
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 | |
add_filter('genesis_responsive_slider_query_args', 'custom_genesis_responsive_slider_query_args'); | |
function custom_genesis_responsive_slider_query_args($query_args) { | |
$term_args = array( ); | |
if ( 'page' != genesis_get_responsive_slider_option( 'post_type' ) ) { | |
if ( genesis_get_responsive_slider_option( 'posts_term' ) ) { |
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 | |
add_filter('tribe_get_event_website_link','my_custom_website_link'); | |
function my_custom_website_link( $html ){ | |
$post_id = is_object($event) && isset($event->tribe_is_event) && $event->tribe_is_event ? $event->ID : $event; | |
$post_id = !empty($post_id) ? $post_id : get_the_ID(); | |
$url = tribe_get_event_meta( $post_id, '_EventURL', true ); | |
if( !empty($url) ) { | |
$label = is_null($label) ? $url : $label; | |
if( !empty( $url )) { |
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 | |
add_action( 'init', 'tribe_events_wootheme_compatibility' ); | |
function tribe_events_wootheme_compatibility() { | |
if ( ! is_home() ) { | |
remove_filter( 'pre_get_posts', 'woo_exclude_categories_homepage', 10 ); | |
} | |
} |
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 | |
add_action('template_include', 'avoid_404_event_titles', 1); | |
function avoid_404_event_titles() { | |
global $wp_query; | |
if (property_exists($wp_query, 'tribe_is_event') && $wp_query->tribe_is_event and $wp_query->is_404) | |
$wp_query->is_404 = false; | |
} |
NewerOlder