From a9464bcc5b020764fcbd293f72be7796c8e93bfb Mon Sep 17 00:00:00 2001 From: okmttdhr Date: Mon, 5 Jun 2023 12:02:58 +0900 Subject: [PATCH] Avoid changing non-theme-preview requests --- lib/compat/wordpress-6.3/theme-previews.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.3/theme-previews.php b/lib/compat/wordpress-6.3/theme-previews.php index e73c13daa7cfb5..5a6f282d301bc5 100644 --- a/lib/compat/wordpress-6.3/theme-previews.php +++ b/lib/compat/wordpress-6.3/theme-previews.php @@ -14,7 +14,7 @@ function gutenberg_get_theme_preview_path( $current_stylesheet = null ) { // Don't allow non-admins to preview themes. if ( ! current_user_can( 'switch_themes' ) ) { - return; + return $current_stylesheet; } $preview_stylesheet = ! empty( $_GET['theme_preview'] ) ? $_GET['theme_preview'] : null;