[wp-trac] [WordPress Trac] #23253: Lack of a do_settings_section (singular) function

WordPress Trac noreply at wordpress.org
Mon Jan 21 19:20:07 UTC 2013


#23253: Lack of a do_settings_section (singular) function
-----------------------------+-------------------------
 Reporter:  auniquename      |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Plugins
  Version:                   |   Severity:  normal
 Keywords:                   |
-----------------------------+-------------------------
 After considerable research I have found that plugin authors, including
 myself, have to go to great lengths to put options into tabs on a plugin
 settings page. The majority use JavaScript to modify the DOM in order to
 achieve this, others have broken their options into several settings
 arrays instead of the recommended single array to facilitate the creation
 of tabs using the traditional WordPress nav-tab-wrapper class approach.

 To get my own options into tabs in a fully scoped css jquery ui theme I
 ended up adding my own hacky function to my plugin:
 myplugin_do_settings_section( $page, $sectionid ) - which is just a copy
 of the core function do_settings_sections( $page ) with an additional
 parameter for the section id and an added conditional to only output the
 section with the requested id.

 This allows me to wrap each section in the appropriately classed tags for
 either jquery ui tabs or traditional WordPress nav-tabs. This however, is
 not an acceptable long-term solution as the core code will undoubtedly
 change, I already see tickets and revisions relating to the removal of
 those nasty tables...

 This functionality should be in the core code. A settings section is a
 ''section'' and it should be possible to output them one at a time to
 allow for styling.

 Thanks for considering my proposal.

 (Also, the Iris color picker does not play nice with jquery-ui - it needs
 its own css scope or something - that will be a separate ticket once I
 have a better understanding of what is wrong with it and have searched for
 existing tickets on the subject.)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23253>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list