Skip to content

Commit

Permalink
Avoid changing non-theme-preview requests (#51221)
Browse files Browse the repository at this point in the history
  • Loading branch information
okmttdhr authored Jun 5, 2023
1 parent 6f6a44a commit 27b78f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.3/theme-previews.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 27b78f2

Please sign in to comment.