Skip to content

Commit

Permalink
Move file to experimental section
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardo-godaddy committed Sep 15, 2023
1 parent f24e68b commit 8e13379
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 0 additions & 10 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,3 @@ function gutenberg_pre_init() {

require_once __DIR__ . '/lib/load.php';
}


add_action('wp_print_scripts', function () {
if (!is_user_logged_in()) {
return;
}

wp_enqueue_style('wp-commands');
wp_enqueue_script('wp-core-commands');
}, 1);
13 changes: 13 additions & 0 deletions lib/experimental/commands.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

/**
* Used to enqueue the command palette everywhere in WordPress.
*/
add_action('wp_print_scripts', function () {
if (!is_user_logged_in()) {
return;
}

wp_enqueue_style('wp-commands');
wp_enqueue_script('wp-core-commands');
}, 1);
1 change: 1 addition & 0 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/compat/wordpress-6.4/script-loader.php';

// Experimental features.
require __DIR__ . '/experimental/commands.php';
require __DIR__ . '/experimental/block-editor-settings-mobile.php';
require __DIR__ . '/experimental/blocks.php';
require __DIR__ . '/experimental/navigation-theme-opt-in.php';
Expand Down

0 comments on commit 8e13379

Please sign in to comment.