More targeted background image styling for admin menu SVG icons. fixes #25147.

git-svn-id: https://develop.svn.wordpress.org/trunk@26671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2013-12-05 17:52:48 +00:00
parent ed908f78a1
commit df454bb0b6
2 changed files with 6 additions and 1 deletions

View File

@ -1874,9 +1874,13 @@ form.upgrade .hint {
width: 34px;
height: 30px;
margin: 0;
text-align: center;
}
#adminmenu div.wp-menu-image.svg {
background-repeat: no-repeat;
background-position: center;
text-align: center;
background-size: 20px auto;
}
div.wp-menu-image:before {

View File

@ -80,6 +80,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
} elseif ( 0 === strpos( $item[6], 'data:image/svg+xml;base64,' ) ) {
$img = '<br />';
$img_style = ' style="background-image:url(\'' . esc_attr( $item[6] ) . '\')"';
$img_class = ' svg';
} elseif ( 0 === strpos( $item[6], 'dashicons-' ) ) {
$img = '<br />';
$img_class = ' dashicons ' . sanitize_html_class( $item[6] );