%s

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