File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
packages/core-commands/src Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,11 @@ function gutenberg_enqueue_command_palette_assets() {
2424 return ;
2525 }
2626
27- $ gutenberg_experiments = get_option ( 'gutenberg-experiments ' );
28- if ( empty ( $ gutenberg_experiments ) || ! array_key_exists ( 'gutenberg-command-palette-everywhere ' , $ gutenberg_experiments ) ) {
29- return ;
30- }
31-
3227 wp_enqueue_script ( 'wp-commands ' );
3328 wp_enqueue_style ( 'wp-commands ' );
3429 wp_enqueue_script ( 'wp-core-commands ' );
3530
36- $ inline_script = <<<JS
37- window.__experimentalEnableCommandPaletteEverywhere = true;
38- wp.coreCommands.initializeCommandPalette();
39- JS ;
31+ $ inline_script = 'wp.coreCommands.initializeCommandPalette(); ' ;
4032
4133 wp_add_inline_script ( 'wp-core-commands ' , $ inline_script );
4234}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function CommandPalette() {
3131 * unless the experimental setting is enabled.
3232 */
3333export function initializeCommandPalette ( ) {
34- if ( ! window . __experimentalEnableCommandPaletteEverywhere ) {
34+ if ( ! globalThis . IS_GUTENBERG_PLUGIN ) {
3535 return ;
3636 }
3737 const root = document . createElement ( 'div' ) ;
You can’t perform that action at this time.
0 commit comments