Skip to content

Commit

Permalink
Fix PHPCS linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardo-godaddy committed Sep 15, 2023
1 parent 0358348 commit 4099e69
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions lib/experimental/commands.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<?php
/**
* Experiment to enable Command Palette everywhere in WordPress.
*
* @package gutenberg
*/

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

wp_enqueue_style('wp-commands');
wp_enqueue_script('wp-core-commands');
}, 1);
wp_enqueue_style( 'wp-commands' );
wp_enqueue_script( 'wp-core-commands' );
}

add_action( 'wp_print_scripts', 'gutenberg_enqueue_commands', 1 );

0 comments on commit 4099e69

Please sign in to comment.