Make WordPress Core

Opened 3 years ago

Closed 8 weeks ago

#23253 closed enhancement (maybelater)

Lack of a do_settings_section (singular) function

Reported by: auniquename Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords: needs-patch
Focuses: administration Cc:


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.)

Change History (3)

#1 @nacin
22 months ago

  • Component changed from Plugins to Admin APIs
  • Focuses administration added

#2 @nacin
22 months ago

  • Component changed from Admin APIs to Plugins

Sorry for the noise.

#3 @chriscct7
8 weeks ago

  • Keywords needs-patch added
  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Closing as maybelater. Complete lack of interest on the feature on the ticket over the last 2 years. Feel free to reopen when more interest re-emerges (particularly if there's a patch)

Note: See TracTickets for help on using tickets.