[wp-trac] [WordPress Trac] #15691: Network admin should have its own settings API
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 28 23:01:47 UTC 2011
#15691: Network admin should have its own settings API
-----------------------------+-----------------------------
Reporter: joostdevalk | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Network Admin | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+-----------------------------
Changes (by boonebgorges):
* cc: boonebgorges@… (added)
Comment:
15691.patch takes the following tack:
- Don't use options.php but instead have a wrapper settings_form_action()
that returns options.php on Site Admin and edit.php?action=pluginsettings
on Network Admin. Seems more consistent with the way that Network Admin
works, which strikes me as a good thing. Downside is that plugins would
have to be updated to be Network-compatible. But this is not a regression,
so that seems OK to me.
- When settings come from Network Admin, save them to site options
automatically. This strikes me as appropriate for the majority of plugins.
It does mean that plugin authors will need to be smart when they are
calling up their options in order to prepopulate the settings fields - if
they want plugins to work both networkwide and on single sites, they'll
have to use $options = is_network_admin() ? get_site_option(
'my_plugin_options' ) : get_option( 'my_plugin_options' ); or something
like that.
This second point seems problematic to me. Ideally, it would be nice if
settings were registered from the very beginning (register_setting()) as
site_options or not. But this would require a pretty significant rewrite
of how register_settings(), and the option whitelists, currently work.
Feedback welcome.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15691#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list