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_ads_to_search() { | |
if ( ! is_search() ) | |
return; | |
// display ads | |
cp_adbox_336x280(); | |
} | |
add_action( 'appthemes_before_loop', 'childtheme_add_ads_to_search' ); // before listings | |
add_action( 'appthemes_after_loop', 'childtheme_add_ads_to_search' ); // after listings |
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_remove_theme_supports() { | |
remove_theme_support( 'ticket-milestones' ); | |
remove_theme_support( 'ticket-assignment' ); | |
} | |
add_action( 'after_setup_theme', 'childtheme_remove_theme_supports', 11 ); |
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 | |
function childtheme_duplicate_check_of_id_field( $post_meta ) { | |
global $wpdb; | |
foreach ( $post_meta as $meta_key => $meta_value ) { | |
if ( $meta_key == 'clpr_id' && ! empty( $meta_value ) ) { | |
$sql = $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'clpr_id' AND meta_value = %s", $meta_value ); | |
if ( $wpdb->get_var( $sql ) ) { | |
$post_meta[ $meta_key ] = 'delete_this_post'; |
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_remove_theme_supports() { | |
remove_theme_support( 'app-login' ); | |
} | |
add_action( 'appthemes_init', 'childtheme_remove_theme_supports' ); |
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_remove_deprecated_files() { | |
if ( file_exists( get_stylesheet_directory() . '/some-file.php' ) ) { | |
unlink( get_stylesheet_directory() . '/some-file.php' ); | |
} | |
} | |
add_action( 'appthemes_first_run', 'childtheme_remove_deprecated_files' ); |
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_block_wp_admin() { | |
if ( ! current_user_can( 'manage_options' ) && ! defined( 'DOING_AJAX' ) ) { | |
wp_redirect( home_url( '/' ) ); | |
} | |
} | |
add_action( 'admin_init', 'childtheme_block_wp_admin' ); |
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_prefer_gd_lib_over_imagic( $editors ) { | |
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); | |
} | |
add_filter( 'wp_image_editors', 'childtheme_prefer_gd_lib_over_imagic', 9, 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_set_poland_as_default_country( $args, $result, $post ) { | |
if ( ! $post && $args['value'] == 'Poland' ) { | |
$args['selected'] = 'selected'; | |
} | |
return $args; | |
} | |
add_filter( 'cp_formbuilder_cp_country_option', 'childtheme_set_poland_as_default_country', 10, 3 ); |
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; | |
} | |
}); |
OlderNewer