Commit 46c533f5cf for wordpress.org
commit 46c533f5cf1476bfe523dca4f3ac82f5aa0d996c
Author: wildworks <wildworks@git.wordpress.org>
Date: Tue Dec 16 08:20:33 2025 +0000
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
diff --git a/wp-admin/customize.php b/wp-admin/customize.php
index 1fc376f68c..141fb93dc3 100644
--- a/wp-admin/customize.php
+++ b/wp-admin/customize.php
@@ -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';
diff --git a/wp-includes/version.php b/wp-includes/version.php
index dfcab51404..e8cbcadd56 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -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.