Skip to content

Commit

Permalink
Don't enqueue Gutenberg styles if Gutenberg isn't running (#3052)
Browse files Browse the repository at this point in the history
  • Loading branch information
pento authored Oct 18, 2017
1 parent f918911 commit 15c515b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ function gutenberg_init( $return, $post ) {
return false;
}

add_action( 'admin_enqueue_scripts', 'gutenberg_editor_scripts_and_styles' );

require_once( ABSPATH . 'wp-admin/admin-header.php' );
the_gutenberg_project();

Expand Down
1 change: 0 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -806,4 +806,3 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
*/
do_action( 'enqueue_block_editor_assets' );
}
add_action( 'admin_enqueue_scripts', 'gutenberg_editor_scripts_and_styles' );

0 comments on commit 15c515b

Please sign in to comment.