这是制作单个配色方案所需的一些示例代码。
wp_admin_css_color( \'classic\', __( \'Classic\' ), admin_url( "css/colors-classic.css" ), array(
\'#07273E\', \'#14568A\', \'#D54E21\', \'#2683AE\'
) );
源文件:
wp-includes/general-template.php
/**
* Register color schemes.
*/
function add_colors()
示例:向下滚动找到复制的配色方案,复制所有代码,将其粘贴到该函数的底部,并为其指定自定义配色方案名称。最后,底部的两个选项(在函数关闭之前)应该如下所示:
wp_admin_css_color(
\'seashore\', __( \'Seashore\', \'admin_schemes\' ),
plugins_url( "seashore/colors$suffix.css", __FILE__ ),
array( \'#F8F6F1\', \'#d5cdad\', \'#7D6B5C\', \'#456a7f\' ),
array( \'base\' => \'#533C2F\', \'focus\' => \'#F8F6F1\', \'current\' => \'#F8F6F1\' )
);
wp_admin_css_color(
\'matt\', __( \'Matt\', \'admin_schemes\' ),
plugins_url( "matt/colors$suffix.css", __FILE__ ),
array( \'#1F2C39\', \'#2c3e50\', \'#1abc9c\', \'#f39c12\' ),
array( \'base\' => \'#f1f2f3\', \'focus\' => \'#fff\', \'current\' => \'#fff\' )
);