In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to customize the background management interface color matching in WordPress, the article is very detailed, has a certain reference value, interested friends must read it!
The new design from WordPress 3.8 supports multi-color selection in the background, and there are eight very beautiful color choices by default, which can be chosen by users.
About color matching WordPress provides a function wp_admin_css_color () that allows developers to customize color matching. You only need to call this function to complete all registration operations.
Parameters.
Wp_admin_css_color ($key, $name, $url, $colors = array (), $icons = array ())
$key (string): ID of the color
$name (string): the name of the color, displayed in the background
$url (string): the CSS referenced when this color is selected
$colors (array): unlimited number of demo colors under the name when the user selects the color, and 4 are recommended. The default is an empty array
$icons (array): the color of the SVG icon, which can be set into an array of length 3, with key values of base, focus, and current, respectively. The default is an empty array
Examples
First of all, you need to prepare a CSS file, this CSS file stores the CSS that is called when the user chooses your color matching, that is, the CSS that stores the color matching style, which you can customize, or directly copy the default color CSS that comes with WordPress to modify it (/ wp-admin/css/colors.min.css).
Then you can register in the PHP file, first look at an example, this example creates a function to mount to admin_init, and then add color to it.
/ * create background custom color matching * http://www.endskin.com/add-admin-color/*/function Bing_add_admin_color () {wp_admin_css_color ('Bing',' custom', get_bloginfo ('template_directory'). '/ color_style.css', array (' red','# AAA','# FEFEFE','# 000'), array ('base' = >' # 999 Bing_add_admin_color', 'focus' = >' # 2ea2cccalendar, 'current' = >' # fff'));} add_action ('admin_init',' Bing_add_admin_color')
Position
File where the function is located: / wp-includes/general-template.php
The above is all the contents of the article "how to customize the background management interface color matching in WordPress". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.