wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_color_scheme_menu_icon_styles › WordPress Function

Since7.2.0
已弃用n/a
› wp_color_scheme_menu_icon_styles ( 没有参数 )
查看:
定义在:
文档:

Colors inline SVG admin menu icons with the icon colors of the current admin color scheme.

These are the colors a scheme registers through the $icons argument of wp_admin_css_color(). svg-painter.js applies the same colors to menu icons given as base64-encoded SVG; this does it for inline SVG icons, with CSS. The rules are printed before the stylesheet of the scheme, so a scheme that colors the icon element itself overrides them.


源码

function wp_color_scheme_menu_icon_styles() {
	$styles = _wp_get_color_scheme_menu_icon_styles( get_user_option( 'admin_color' ) );

	if ( '' !== $styles ) {
		wp_add_inline_style( 'admin-menu', $styles );
	}
}