[wp-trac] [WordPress Trac] #64762: Frontend admin toolbar not using updated admin color scheme
WordPress Trac
noreply at wordpress.org
Sat Feb 28 21:15:32 UTC 2026
#64762: Frontend admin toolbar not using updated admin color scheme
-------------------------------------------------+-------------------------
Reporter: huzaifaalmesbah | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Toolbar | Version: trunk
Severity: normal | Resolution:
Keywords: has-screenshots admin-reskin 2nd- | Focuses: ui, css
opinion |
-------------------------------------------------+-------------------------
Changes (by sabernhardt):
* keywords: has-screenshots => has-screenshots admin-reskin 2nd-opinion
* version: => trunk
Comment:
The front end intentionally did not use colors from the administration
color scheme, and the `$_wp_admin_css_colors` variable is not available.
See #26021 and #43742.
That is awkward now, after the default scheme changed within the admin
area, but it was a decision.
If it is worth editing only for the Modern scheme,
`WP_Admin_Bar::initialize()` theoretically could have something like this
between enqueuing the `admin-bar` style and `do_action( 'admin_bar_init'
);`.
{{{
if ( ! is_admin() ) {
global $wp_version;
$user_color = get_user_option( 'admin_color' );
if ( isset( $user_color ) && 'modern' === $user_color ) {
$suffix = is_rtl() ? '-rtl' : '';
$suffix .= SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_style(
'admin-bar-admin-color',
admin_url( "css/colors/modern/colors$suffix.css"
),
array(),
$wp_version
);
}
}
}}}
(I'm not sure whether it should check whether the user is logged in or any
other conditions.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64762#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list