Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Site Editor: remove the default admin CSS
  • Loading branch information
ellatrix committed Oct 24, 2024
commit 187a7748c6027e3c65bec0e2fa4397e930f9e407
6 changes: 5 additions & 1 deletion src/wp-admin/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@
<title><?php echo esc_html( $admin_title ); ?></title>
<?php

wp_enqueue_style( 'colors' );
// We do not need the default admin CSS stylesheets in the Site Editor.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// We do not need the default admin CSS stylesheets in the Site Editor.
// Do not load the default admin CSS stylesheets if in the Site Editor.

That's a little more into the point imho.

if ( $hook_suffix !== 'site-editor.php' ) {

Check failure on line 94 in src/wp-admin/admin-header.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Use Yoda Condition checks, you must.
wp_enqueue_style( 'colors' );
}

wp_enqueue_script( 'utils' );
wp_enqueue_script( 'svg-painter' );

Expand Down
Loading