wp_admin_css_color
函数
wp_admin_css_color ( $key, $name, $url, $colors = array(), $icons = array() )
- 参数
-
-
(string)
$key
The unique key for this theme.- Required: 是
-
(string)
$name
The name of the theme.- Required: 是
-
(string)
$url
The URL of the CSS file containing the color scheme.- Required: 是
-
(array)
$colors
Optional. An array of CSS color definition strings which are used to give the user a feel for the theme.- Required: 否
- Default: array()
-
(array)
$icons
{ Optional. CSS color definitions used to color any SVG icons. @type string $base SVG icon base color. @type string $focus SVG icon color on focus. @type string $current SVG icon color of current admin menu link. }- Required: 否
- Default: array()
-
(string)
- 定义位置
-
-
wp-includes/general-template.php
, line 4677
-
wp-includes/general-template.php
- 引入
- 2.5.0
- 弃用
- –
Registers an admin color scheme css file.
Allows a plugin to register a new admin color scheme. For example:
wp_admin_css_color( ‘classic’, __( ‘Classic’ ), admin_url( “css/colors-classic.css” ), array(
‘#07273E’, ‘#14568A’, ‘#D54E21’, ‘#2683AE’
) );
function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = array() ) { global $_wp_admin_css_colors; if ( ! isset( $_wp_admin_css_colors ) ) { $_wp_admin_css_colors = array(); } $_wp_admin_css_colors[ $key ] = (object) array( 'name' => $name, 'url' => $url, 'colors' => $colors, 'icon_colors' => $icons, ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。