%s

', $message ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Prevents the Customizer from being loaded on PHP versions prior to 5.4. * * @since 1.0.0 * * @global const PHP_VERSION PHP version. */ function bayleaf_prevent_customize_load() { wp_die( sprintf( /* translators: %s: Installed PHP version */ esc_html__( 'bayleaf requires at least PHP version 5.4. You are running version %s. Please upgrade and try again.', 'bayleaf' ), PHP_VERSION ), '', array( 'back_link' => true ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } add_action( 'load-customize.php', 'bayleaf_prevent_customize_load' ); /** * Prevents the Theme Preview from being loaded on PHP versions prior to 5.4. * * @since 1.0.0 * * @global const PHP_VERSION PHP version. */ function bayleaf_prevent_preview() { if ( isset( $_GET['preview'] ) ) { wp_die( sprintf( /* translators: %s: Installed PHP version */ esc_html__( 'bayleaf requires at least PHP version 5.4. You are running version %s. Please upgrade and try again.', 'bayleaf' ), PHP_VERSION ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } add_action( 'template_redirect', 'bayleaf_prevent_preview' );