mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
CSS: Stop using wp-admin.min.css and instead queue the individual stylesheets up through load-styles.php.
We still generate the `wp-admin.*` files for compabitility purposes, however they only include the `@import()` lines. Fixes #35229 git-svn-id: https://develop.svn.wordpress.org/trunk@36341 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -15,7 +15,11 @@ require( ABSPATH . 'wp-admin/includes/noop.php' );
|
||||
require( ABSPATH . WPINC . '/script-loader.php' );
|
||||
require( ABSPATH . WPINC . '/version.php' );
|
||||
|
||||
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
|
||||
$load = $_GET['load'];
|
||||
if ( is_array( $load ) ) {
|
||||
$load = implode( '', $load );
|
||||
}
|
||||
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
|
||||
$load = array_unique( explode( ',', $load ) );
|
||||
|
||||
if ( empty($load) )
|
||||
@@ -44,6 +48,11 @@ foreach ( $load as $handle ) {
|
||||
continue;
|
||||
|
||||
$style = $wp_styles->registered[$handle];
|
||||
|
||||
if ( empty( $style->src ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$path = ABSPATH . $style->src;
|
||||
|
||||
if ( $rtl && ! empty( $style->extra['rtl'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user