[wp-trac] [WordPress Trac] #29706: Settings API - term consitency

WordPress Trac noreply at wordpress.org
Thu Sep 18 20:16:03 UTC 2014


#29706: Settings API - term consitency
--------------------------------+----------------------
 Reporter:  Cleanshooter        |       Owner:
     Type:  enhancement         |      Status:  closed
 Priority:  normal              |   Milestone:
Component:  Options, Meta APIs  |     Version:  4.0
 Severity:  normal              |  Resolution:  invalid
 Keywords:                      |     Focuses:
--------------------------------+----------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 I'm not going to spend too much time defending the Settings API as it is
 fairly convoluted. But the points you mention are fairly easy to explain.
 The easiest way to look at it is the Options API is a low-level CRUD API
 for storing key/value pairs for a site, called options, while the Settings
 API is a higher-level API designed to handle user interactions for a
 subset of those options — not all options are UI settings. These
 interactions include the interface and also saving, including
 sanitization/validation.

 You can use the Options API for anything you want to store, but a user
 can't actually modify it without a UI and without it being registered for
 this use with register_setting().

 do_settings_sections() clearly is designed to "do"multiple sections, and
 it's best to consider the entire function prototype when figuring out what
 it does, not just the name. do_settings_sections( $page ) does the setting
 sections for a page, while do_settings_fields( $page, $section ) does the
 fields for a page's section.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29706#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list