Skip to content

Commit

Permalink
Fix PHP error when users don't have access to the Appearance menu (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath authored Sep 7, 2020
1 parent 612acd3 commit 6b95e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function gutenberg_menu() {
'gutenberg'
);

if ( gutenberg_use_widgets_block_editor() ) {
if ( gutenberg_use_widgets_block_editor() && isset( $submenu['themes.php'] ) ) {
add_theme_page(
__( 'Widgets', 'gutenberg' ),
__( 'Widgets', 'gutenberg' ),
Expand Down

0 comments on commit 6b95e0d

Please sign in to comment.