[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
Mon Jul 30 04:40:47 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 kovshenin):

 Replying to [comment:40 azaozz], helenyhou and scribu:

 Sound fair. Would a standard template be 28x54 pixels image and twice as
 large for 2x? If that's the case we can also have a default for the
 background size argument, which would leave the regular url (and 2x url
 for 2x) as the only required fields. If we want columns we'll need an
 optional columns arg that should go together with a background size (or
 columns count?)

 {{{
 'menu_icon' => array(
         'image_url' => '.../sprite.png',
 ),
 }}}

 {{{
 'menu_icon' => array(
         'image_url' => '.../sprite.png',
         'image_url_2x' => '.../sprite-2x.png',
 ),
 }}}

 {{{
 'menu_icon' => array(
         'image_url' => '.../sprite.png',
         'image_url_2x' => '.../sprite-2x.png',
         'size' => '84, 56', // three columns,
         'column' => 2,
 ),
 }}}

 Or maybe drop the size and use columns instead:

 {{{
 'menu_icon' => array(
         'image_url' => '.../sprite.png',
         'image_url_2x' => '.../sprite-2x.png',
         'columns' => 3, // 84x56 image
         'column' => 2,
 ),
 }}}

 Would this be simple enough to understand and use?

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


More information about the wp-trac mailing list