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
// displays error if user choose featured ad and did not selected any image | |
if ( typeof window.appFileCount != 'undefined' ) { | |
jQuery('input[type=submit]').on('click', function() { | |
window.appFileCountBrowser = 0; | |
jQuery('input[type="file"]').each(function() { | |
if ( jQuery(this).val() != '' ) { | |
window.appFileCountBrowser += 1; | |
} | |
}); |
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
function childtheme_redirect_to_seo_search_url() { | |
if ( is_search() && false === strpos( $_SERVER['REQUEST_URI'], '/search/' ) ) { | |
$s = trim( get_query_var( 's' ) ); | |
if ( empty( $s ) ) { | |
return; | |
} | |
$seo_url = home_url( 'search' ) . '/' . str_replace( ' ', '+', str_replace( '%20', '+', $s ) ) . '/'; |
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
function childtheme_trust_template( $template ) { | |
global $wp_query; | |
if ( ! isset( $wp_query->query_vars['trust'] ) || ! is_singular() ) { | |
return $template; | |
} | |
if ( $trust_template = locate_template( 'trust-template.php' ) ) { | |
return $trust_template; | |
} else { |
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
function childtheme_do_not_display_unreliable_coupons_in_slider( $args ) { | |
$args['post_status'] = 'publish'; | |
return $args; | |
} | |
add_filter( 'clpr_featured_slider_args', 'childtheme_do_not_display_unreliable_coupons_in_slider' ); |
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
function childtheme_no_emails( &$phpmailer ) { | |
// Empty out the values that may be set | |
$phpmailer->ClearAllRecipients(); | |
$phpmailer->ClearAttachments(); | |
$phpmailer->ClearCustomHeaders(); | |
$phpmailer->ClearReplyTos(); | |
} | |
add_action( 'phpmailer_init', 'childtheme_no_emails', 99, 1 ); |
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
function childtheme_control_when_to_display_featured_slider( $featured ) { | |
if ( count( $featured->posts ) < 5 ) { | |
return false; | |
} | |
return $featured; | |
} | |
add_filter( 'cp_featured_slider_ads', 'childtheme_control_when_to_display_featured_slider' ); |
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
function childtheme_import_geo_coordinates_args( $args ) { | |
$args['custom_fields']['lat'] = 'lat'; | |
$args['custom_fields']['lng'] = 'lng'; | |
return $args; | |
} | |
add_filter( 'cp_csv_importer_args', 'childtheme_import_geo_coordinates_args', 10, 1 ); | |
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
function childtheme_ad_contact_do_not_use_user_data( $email, $post_id ) { | |
$email['from'] = get_option( 'admin_email' ); | |
$email['from_name'] = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ); | |
return $email; | |
} | |
add_filter( 'cp_email_user_ad_contact', 'childtheme_ad_contact_do_not_use_user_data', 10, 2 ); |
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 | |
add_action('init', 'tribe_allow_large_joins'); | |
function tribe_allow_large_joins(){ | |
global $wpdb; | |
$wpdb->query('SET SQL_BIG_SELECTS=1'); | |
} |
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
function childtheme_add_unique_id( $post_id ) { | |
$post = get_post( $post_id ); | |
if ( $post->post_type != VA_LISTING_PTYPE ) { | |
return; | |
} | |
$id = get_post_meta( $post_id, 'va_id', true ); | |
if ( empty( $id ) ) { | |
$id = uniqid( rand( 10, 1000 ), false ); |
OlderNewer