Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp admin css color

This page redirects to an external site: https://developer.wordpress.org/reference/functions/wp_admin_css_color/

Description

Registers an admin colour scheme css file.

Allows a plugin to register a new admin colour scheme.

Usage

<code style="color: #000000"> <span style="color: #0000BB"><?php wp_admin_css_color</span><span style="color: #007700">( </span><span style="color: #0000BB">$key</span><span style="color: #007700">, </span><span style="color: #0000BB">$name</span><span style="color: #007700">, </span><span style="color: #0000BB">$url</span><span style="color: #007700">, </span><span style="color: #0000BB">$colors</span><span style="color: #007700">, </span><span style="color: #0000BB">$icons </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span> </code>

Parameters

$key
(string) (required) The unique key for this theme.
Default: None
$name
(string) (required) The name of the theme.
Default: None
$url
(string) (required) The url of the css file containing the colour scheme.
Default: None
$colors
(array) (optional) An array of CSS color definitions which are used to give the user a feel for the theme.
Default: None
$icons
(array) (optional) An array of CSS color definitions used to color any SVG icons.
Default: None

Example

To register the Classic admin theme using default blue scheme use:

 wp_admin_css_color(
   'classic',
   __('Classic'),
   admin_url("css/colors/blue/colors.css"),
   array('#07273E', '#14568A', '#D54E21', '#2683AE'),
   array( 'base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff' )
 );

Change Log

Source File

wp_admin_css_color() is located in wp-includes/general-template.php.

Further Reading

Related

register_admin_color_schemes()

See also index of Function Reference and index of Template Tags.