Skip to content

Commit

Permalink
only allow users with appropriate permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Dec 6, 2024
1 parent fc24088 commit 40ba8e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.8/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function gutenberg_redirect_site_editor_deprecated_urls() {
* @return callable The default handler or a custom handler.
*/
function gutenberg_styles_wp_die_handler( $default_handler ) {
if ( ! wp_is_block_theme() && str_contains( $_SERVER['REQUEST_URI'], 'site-editor.php' ) ) {
if ( ! wp_is_block_theme() && str_contains( $_SERVER['REQUEST_URI'], 'site-editor.php' ) && current_user_can( 'edit_theme_options' ) ) {
return '__return_false';
}
return $default_handler;
Expand Down

0 comments on commit 40ba8e6

Please sign in to comment.