Customizer: Add admin color scheme class to body element.
This changeset injects a CSS class called `admin-color-{slug}` into the `body` element in the Customizer screen based on the admin color scheme setting.
Props soyebsalar01, westonruter, wildworks.
Fixes #64415.
Built from https://develop.svn.wordpress.org/trunk@61385
git-svn-id: http://core.svn.wordpress.org/trunk@60697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -147,6 +147,8 @@ if ( is_rtl() ) {
|
||||
$body_class .= ' rtl';
|
||||
}
|
||||
$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
|
||||
$admin_color = get_user_option( 'admin_color' );
|
||||
$body_class .= ' admin-color-' . sanitize_html_class( is_string( $admin_color ) ? $admin_color : '', 'fresh' );
|
||||
|
||||
if ( wp_use_widgets_block_editor() ) {
|
||||
$body_class .= ' wp-embed-responsive';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61384';
|
||||
$wp_version = '7.0-alpha-61385';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user