[wp-trac] [WordPress Trac] #23449: Refactor customizer accordion to work anywhere in admin

WordPress Trac noreply at wordpress.org
Thu Feb 14 14:01:04 UTC 2013


#23449: Refactor customizer accordion to work anywhere in admin
--------------------------------------------+------------------
 Reporter:  lessbloat                       |       Owner:
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  3.6
Component:  Appearance                      |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  needs-patch 3.6-menus ui-focus  |
--------------------------------------------+------------------

Comment (by aaroncampbell):

 I think the patch looks fine.  It's basically moving working code to a new
 location without changing anything (except for generalizing some class
 names).

 Having said that, I'd like to fix some things that prevent them from being
 nested because someone is going to try to nest them (you know they will).

 That means using closest() instead of parents(), changing `$( '.accordion-
 section' ).not( clicked ).removeClass( 'open' ); ` to `clicked.closest(
 '.accordion-container' ).find( '.accordion-section' ).not( clicked
 ).removeClass( 'open' );`, and changing all uses of id to class.

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


More information about the wp-trac mailing list