wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_color_scheme_menu_icon_styles › WordPress Function

Seit7.2.0
Veraltetn/v
› wp_color_scheme_menu_icon_styles ( Keine Parameter )
Siehe:
Definiert in:
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.


Quellcode

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