[wp-trac] [WordPress Trac] #20052: Support sprites for admin menu icons in register_post_type and add_menu_page
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 17 18:59:12 UTC 2012
#20052: Support sprites for admin menu icons in register_post_type and
add_menu_page
----------------------------+-----------------------------
Reporter: helenyhou | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: needs-patch |
----------------------------+-----------------------------
Comment (by scribu):
Why exactly would you need a param inside register_post_type() to add CSS?
Just hook into admin_enqueue_scripts().
The problem is that the required CSS is horrid. Here's what you have to
add for a single menu:
{{{
#toplevel_page_app-dashboard div.wp-menu-image {
background-image: url('...images/admin-menu.png');
background-position: -0px -33px !important;
}
#toplevel_page_app-dashboard div.wp-menu-image img {
display: none;
}
#toplevel_page_app-dashboard:hover div.wp-menu-image,
#toplevel_page_app-dashboard.wp-has-current-submenu div.wp-menu-image {
background-position: -0px -1px !important;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20052#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list