diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 74141dc39c..b815e77e3a 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -545,3 +545,17 @@ require get_template_directory() . '/inc/customizer.php'; if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { require get_template_directory() . '/inc/featured-content.php'; } + +/** + * Add an `is_customize_preview` function if it is missing. + * + * Enables installing Twenty Fourteen in WordPress versions before 4.0.0 when the + * `is_customize_preview` function was introduced. + */ +if ( ! function_exists( 'is_customize_preview' ) ) : +function is_customize_preview() { + global $wp_customize; + + return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview(); +} +endif;