wp_color_scheme_settings() WordPress Function
The wp_color_scheme_settings() function allows you to modify the default colors for the color schemes in WordPress.
wp_color_scheme_settings() #
Source
File: wp-admin/includes/misc.php
function wp_color_scheme_settings() { global $_wp_admin_css_colors; $color_scheme = get_user_option( 'admin_color' ); // It's possible to have a color scheme set that is no longer registered. if ( empty( $_wp_admin_css_colors[ $color_scheme ] ) ) { $color_scheme = 'fresh'; } if ( ! empty( $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) { $icon_colors = $_wp_admin_css_colors[ $color_scheme ]->icon_colors; } elseif ( ! empty( $_wp_admin_css_colors['fresh']->icon_colors ) ) { $icon_colors = $_wp_admin_css_colors['fresh']->icon_colors; } else { // Fall back to the default set of icon colors if the default scheme is missing. $icon_colors = array( 'base' => '#a7aaad', 'focus' => '#72aee6', 'current' => '#fff', ); } echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ) ) . ";</script>\n"; }
Expand full source codeCollapse full source codeView on TracView on GitHub