From 46c533f5cf1476bfe523dca4f3ac82f5aa0d996c Mon Sep 17 00:00:00 2001 From: wildworks Date: Tue, 16 Dec 2025 08:20:33 +0000 Subject: [PATCH] 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 --- wp-admin/customize.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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.