[wp-trac] [WordPress Trac] #18285: New Settings API and workflow

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 1 20:19:53 UTC 2011


#18285: New Settings API and workflow
----------------------------+------------------
 Reporter:  nacin           |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.3
Component:  Plugins         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+------------------

Comment (by WraithKenny):

 A major short coming of the old api was that you can pass a only single
 capability, say `unfiltered_html`, to the add_*_page functions, but that
 wouldn't matter (or make sense) since it posted to options.php with a
 hard-coded `manage_options` check (plus an is_super_admin for multisite).
 These API's should work together.

 It might be nice to do capabilities checks in save_settings_page() based
 on what's passed to add_*_page for plugins. (Separate issue: add_*_page
 functions could be enhanced to handle an array of capabilities rather then
 just a single capability.) The options-media example doesn't register
 pages in the same way as a plugin would, so perhaps call a function that
 handles this, and have save_settings_page call it too.

 As another test case, we could look at custom-background.php and custom-
 header.php as examples closer to how plugins and themes would use the API
 and what it's short comings (if any) are, as well as a good future in-core
 code example of how to use it.

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


More information about the wp-trac mailing list