Skip to content

Commit 26e114f

Browse files
authored
Move global variable down, remove is_readable
1 parent 9c21974 commit 26e114f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-includes/admin-bar.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
*/
14101410
function 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' );

0 commit comments

Comments
 (0)