'; printf( /* translators: %s: WordPress Version. */ esc_html__( 'This theme requires WordPress 4.7 or newer. You are running version %s. Please upgrade.', 'bootspress' ), esc_html( $GLOBALS['wp_version'] ) ); echo '

'; } /** * Prevents the Customizer from being loaded on WordPress versions prior to 4.7. * * @since BootsPress 0.9.2 * * @global string $wp_version WordPress version. * * @return void */ function bootspress_customize() { wp_die( sprintf( /* translators: %s: WordPress Version. */ esc_html__( 'This theme requires WordPress 4.7 or newer. You are running version %s. Please upgrade.', 'bootspress' ), esc_html( $GLOBALS['wp_version'] ) ), '', array( 'back_link' => true, ) ); } add_action( 'load-customize.php', 'bootspress_customize' ); /** * Prevents the Theme Preview from being loaded on WordPress versions prior to 4.7. * * @since BootsPress 0.9.2 * * @global string $wp_version WordPress version. * * @return void */ function bootspress_preview() { if ( isset( $_GET['preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification wp_die( sprintf( /* translators: %s: WordPress Version. */ esc_html__( 'This theme requires WordPress 4.7 or newer. You are running version %s. Please upgrade.', 'bootspress' ), esc_html( $GLOBALS['wp_version'] ) ) ); } } add_action( 'template_redirect', 'bootspress_preview' );