Skip to content

Commit 695c962

Browse files
Avoid adding command-palettte admin bar item if wp-core-commands is not enqueued
Co-authored-by: Stephen A. Bernhardt <[email protected]>
1 parent 79812b3 commit 695c962

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/admin-bar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
945945
* @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
946946
*/
947947
function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void {
948-
if ( ! is_admin() ) {
948+
if ( ! is_admin() || ! wp_script_is( 'wp-core-commands', 'enqueued' ) ) {
949949
return;
950950
}
951951

0 commit comments

Comments
 (0)