File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1408,12 +1408,12 @@ function _get_admin_bar_pref( $context = 'front', $user = 0 ) {
14081408 * @global array $_wp_admin_css_colors Registered administration color schemes.
14091409 */
14101410function wp_admin_bar_add_color_scheme_to_front_end () {
1411- global $ _wp_admin_css_colors ;
1412-
14131411 if ( is_admin () ) {
14141412 return ;
14151413 }
14161414
1415+ global $ _wp_admin_css_colors ;
1416+
14171417 if ( empty ( $ _wp_admin_css_colors ) ) {
14181418 register_admin_color_schemes ();
14191419 }
@@ -1427,7 +1427,7 @@ function wp_admin_bar_add_color_scheme_to_front_end() {
14271427 $ color = $ _wp_admin_css_colors [ $ color_scheme ] ?? null ;
14281428 $ url = $ color ->url ?? '' ;
14291429
1430- if ( $ url && is_readable ( $ url ) ) {
1430+ if ( $ url ) {
14311431 $ css = file_get_contents ( $ url );
14321432 if ( is_string ( $ css ) && str_contains ( $ css , '#wpadminbar ' ) ) {
14331433 $ start_position = strpos ( $ css , '#wpadminbar ' );
You can’t perform that action at this time.
0 commit comments