[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 19:27:13 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 azaozz):

 Replying to [comment:13 scribu]:
 > Why exactly would you need a param inside register_post_type() to add
 CSS? Just hook into 'admin_enqueue_scripts'.

 That's how it works at the moment, right? And the css would need to be
 added one way or the other. Restricting it to couple of values passed from
 PHP and auto-generating the css afterwards seems quite limiting (and it
 could still be overloaded from 'admin_head', etc.).

 A good enhancement would be to add an HTML ID derived from the CPT's name
 on the div that takes the icon as a background so it could be targeted
 easier with css.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20052#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list