Make WordPress Core

Ticket #39407: 39407.diff

File 39407.diff, 875 bytes (added by adamsilverstein, 7 years ago)
  • src/wp-content/themes/twentyfourteen/functions.php

     
    545545if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) {
    546546        require get_template_directory() . '/inc/featured-content.php';
    547547}
     548
     549/**
     550 * Add an `is_customize_preview` function if it is missing.
     551 *
     552 * Enables installing Twenty Fourteen in WordPress versions before 4.0.0 when the
     553 * `is_customize_preview` function was introduced.
     554 */
     555if ( ! function_exists( 'is_customize_preview' ) ) :
     556function is_customize_preview() {
     557        global $wp_customize;
     558
     559        return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
     560}
     561endif;