wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_color_scheme_menu_icon_styles › WordPress Function

Since7.2.0
Deprecatedn/a
› wp_color_scheme_menu_icon_styles ( No parameters )
See:
Defined at:
Codex:

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.


Source

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 );
	}
}