File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,27 @@ public function initialize() {
7272 wp_enqueue_script ( 'admin-bar ' );
7373 wp_enqueue_style ( 'admin-bar ' );
7474
75+ if ( ! is_admin () ) {
76+ global $ _wp_admin_css_colors ;
77+
78+ if ( empty ( $ _wp_admin_css_colors ) ) {
79+ register_admin_color_schemes ();
80+ }
81+
82+ $ color_scheme = get_user_option ( 'admin_color ' );
83+
84+ if ( empty ( $ color_scheme ) || ! isset ( $ _wp_admin_css_colors [ $ color_scheme ] ) ) {
85+ $ color_scheme = 'modern ' ;
86+ }
87+
88+ $ color = $ _wp_admin_css_colors [ $ color_scheme ] ?? null ;
89+ $ url = $ color ->url ?? '' ;
90+
91+ if ( $ url ) {
92+ wp_enqueue_style ( 'admin-bar-colors ' , $ url , array ( 'admin-bar ' ) );
93+ }
94+ }
95+
7596 /**
7697 * Fires after WP_Admin_Bar is initialized.
7798 *
You can’t perform that action at this time.
0 commit comments