[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 Jul 27 14:27:54 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: has-patch |
----------------------------+-----------------------------
Comment (by bradyvercher):
The use of two arrays looks good to me, but I don't think it should be a
requirement to use two separate images. The point of sprites is to reduce
requests, so another image will add another request (multiplied by however
many menu icons and potentially screen icons use this technique).
For 2x support, the only required argument in that array should be
'`background_size`'. The image and coordinates should both fall back to
the default array if they don't exist, but the ability to overload them
should be there, if needed, for flexibility.
I didn't examine the patch closely, but it looks like it breaks backwards
compatibility if an image url is passed, and it doesn't appear to account
for `add_menu_page()`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20052#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list