'; printf( /* translators: %s: WordPress Version. */ esc_html__('This theme requires WordPress 4.7 or newer. If you use blocks, you will need at least version 5.0. You are running version %s. Please upgrade.', 'amble'), esc_html($GLOBALS['wp_version']) ); echo '

'; } /** * Prevents the Customizer from being loaded on WordPress versions prior to 4.7. * @since 2.0.0 * @global string $wp_version WordPress version. * @return void */ function amble_customize() { wp_die( sprintf( /* translators: %s: WordPress Version. */ esc_html__('This theme requires WordPress 4.7 or newer. If you use blocks, you will need at least version 5.0. You are running version %s. Please upgrade.', 'amble'), esc_html($GLOBALS['wp_version']) ), '', array( 'back_link' => true, ) ); } add_action('load-customize.php', 'amble_customize'); /** * Prevents the Theme Preview from being loaded on WordPress versions prior to 4.7. * * @since 2.0.0 * @global string $wp_version WordPress version. * @return void */ function amble_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. If you use blocks, you will need at least version 5.0. You are running version %s. Please upgrade.', 'amble'), esc_html($GLOBALS['wp_version']) ) ); } } add_action('template_redirect', 'amble_preview');