%s

', $message ); // WPCS xss ok. } /** * Prevents the Customizer from being loaded on WordPress versions prior to 4.7. * * @since 1.0.0 * * @global string $wp_version WordPress version. */ function aamla_prevent_customize_load() { wp_die( sprintf( /* translators: %s: Installed WordPress version */ esc_html__( 'aamla requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'aamla' ), $GLOBALS['wp_version'] ), '', [ 'back_link' => true ] ); // WPCS xss ok. wp_version predefined by WordPress. } add_action( 'load-customize.php', 'aamla_prevent_customize_load' ); /** * Prevents the Theme Preview from being loaded on WordPress versions prior to 4.7. * * @since 1.0.0 * * @global string $wp_version WordPress version. */ function aagam_prevent_preview() { if ( isset( $_GET['preview'] ) ) { wp_die( sprintf( /* translators: %s: Installed WordPress version */ esc_html__( 'aamla requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'aamla' ), $GLOBALS['wp_version'] ) ); // WPCS xss ok. wp_version predefined by WordPress. } } add_action( 'template_redirect', 'aagam_prevent_preview' );