diff --git a/lib/init.php b/lib/init.php index 880fe852c6fad..e22542766f87e 100644 --- a/lib/init.php +++ b/lib/init.php @@ -113,7 +113,7 @@ function gutenberg_site_editor_menu() { * @param WP_Admin_Bar $wp_admin_bar Core class used to implement the Toolbar API. */ function modify_admin_bar( $wp_admin_bar ) { - if ( gutenberg_use_widgets_block_editor() ) { + if ( gutenberg_use_widgets_block_editor() && $wp_admin_bar->get_node( 'widgets' ) !== null ) { $wp_admin_bar->add_menu( array( 'id' => 'widgets',