Make WordPress Core

Changeset 61385


Ignore:
Timestamp:
12/16/2025 08:18:21 AM (8 weeks ago)
Author:
wildworks
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/customize.php

    r60806 r61385  
    148148}
    149149$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
     150$admin_color = get_user_option( 'admin_color' );
     151$body_class .= ' admin-color-' . sanitize_html_class( is_string( $admin_color ) ? $admin_color : '', 'fresh' );
    150152
    151153if ( wp_use_widgets_block_editor() ) {
Note: See TracChangeset for help on using the changeset viewer.