Skip to content

Commit fa065da

Browse files
authored
Assign list of core color schemes to a variable for readability
1 parent a005035 commit fa065da

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wp-includes/admin-bar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,9 @@ function wp_admin_bar_add_color_scheme_to_front_end() {
14491449
}
14501450

14511451
$color_scheme = get_user_option( 'admin_color' );
1452+
$core_list = array( 'modern', 'light', 'blue', 'coffee', 'ectoplasm', 'midnight', 'ocean', 'sunrise' );
14521453

1453-
if ( empty( $color_scheme ) || ! in_array( $color_scheme, array( 'modern', 'light', 'blue', 'coffee', 'ectoplasm', 'midnight', 'ocean', 'sunrise' ), true ) ) {
1454+
if ( empty( $color_scheme ) || ! in_array( $color_scheme, $core_list, true ) ) {
14541455
return;
14551456
}
14561457

0 commit comments

Comments
 (0)