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

WordPress Trac noreply at wordpress.org
Wed Feb 13 15:22:38 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 lessbloat):

 I mistakenly uploaded this to #23450 yesterday. Oops...

 23449.diff​ is a first pass at this.

 The basic reusable structure looks like this:

 {{{
 <div id="accordion-container">
         <ul>
                 <li class="control-section accordion-section" id
 ="accordion-section-title_tagline">
                         <h3 title="" tabindex="0" class="accordion-
 section-title">Title here</h3>
                         <ul class="accordion-section-content">
                                 <li><!-- content here --></li>
                         </ul>
                 </li>
         </ul>
 </div>
 }}}

 So you'd enqueue the new "accordion" JS file, and drop this code anywhere
 in the admin.

 '''A couple notes'''

 - I left all of the color CSS in wp-admin.css, since for now both fresh,
 and classic use the same colors for the accordion.
 - We could optionally move all of the form element styling (used within
 the customizer) over.  I left that out of this first pass.
 - .accordion-section-content, could just as well be a DIV if you only have
 one block of code to add there (which is likely what I'll do for menus).

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


More information about the wp-trac mailing list