[wp-trac] [WordPress Trac] #23450: Refactor menu item meta boxes as accordion

WordPress Trac noreply at wordpress.org
Tue Apr 2 02:10:02 UTC 2013


#23450: Refactor menu item meta boxes as accordion
-------------------------------------------------+-------------------------
 Reporter:  lessbloat                            |       Owner:
     Type:  enhancement                          |  markjaquith
 Priority:  normal                               |      Status:  closed
Component:  Menus                                |   Milestone:  3.6
 Severity:  normal                               |     Version:  trunk
 Keywords:  3.6-menus has-patch commit needs-    |  Resolution:  fixed
  codex                                          |
-------------------------------------------------+-------------------------

Comment (by nacin):

 DrewAPicture's comment was the result of this comment on #23449:
 > I can't quite tell how much code is duplicated between
 do_accordion_sections() and do_meta_boxes(), but it seems like quite a
 bit. (And this code is, shall we say, unique, so keeping it DRY has some
 importance.) Could we just add an $args array to do_meta_boxes() for
 'accordion' => true?

 It seems like having $args including sortable, accordion, etc., as flags
 could be a nice-to-have. (Though, these flags in this single function may
 not be enough to actually make things work, which makes them lame.)

 I will mention that 'sorted' is used in do_accordion_sections() as a
 priority to look at — but this '''must''' stay (and should be probably
 commented) in case do_meta_boxes() has done sorting on that page in some
 other situation.

 Sorting, I'm being told in IRC, was left out because we wanted to enforce
 'Pages' at the top. But, that can be done by using the meta box priority
 of 'high', I'm pretty sure.

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


More information about the wp-trac mailing list