The newly designed backend starting with WordPress 3.8 supports multi-color selection, and the default is eight very beautiful Color matching allows users to choose.
About color matching WordPress provides a function wp_admin_css_color() that allows developers to customize color matching. All registration operations can be completed by just calling this function.
Parameters
wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = array() );
Example
First you need to prepare a CSS file. This CSS file stores the CSS that is called when the user selects your color scheme, that is, the CSS that stores the color matching style. You can completely customize it, or directly copy the default one that comes with WordPress. Modify the color CSS (/wp-admin/css/colors.min.css).
Then you can register it in the PHP file. Let’s look at an example first. This example creates a function and mounts it to admin_init, and then adds colors to it.
/*** *创建后台自定义配色 *http://www.endskin.com/add-admin-color/ */ function Bing_add_admin_color(){ wp_admin_css_color( 'Bing', '自定义', get_bloginfo( 'template_directory' ) . '/color_style.css', array( 'red', '#AAA', '#FEFEFE', '#000' ), array( 'base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff' ) ); } add_action( 'admin_init', 'Bing_add_admin_color' );
Location
The file where the function is located:/wp-includes/general-template.php