[wp-trac] [WordPress Trac] #35698: Distinguish between regular (site) options and network options in `sanitize_option()`
WordPress Trac
noreply at wordpress.org
Tue Feb 2 20:54:11 UTC 2016
#35698: Distinguish between regular (site) options and network options in
`sanitize_option()`
-------------------------+------------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
-------------------------+------------------------------
Changes (by flixos90):
* keywords: => has-patch
Comment:
[attachment:35698.diff] adds the new filter and a `$scope` parameter which
can be either `site` (default) or `network` to `sanitize_option()`. It
also adjusts the function calls in `add_network_option()` and
`update_network_option()`.
For backwards compatibility reasons I kept the regular filter in
`sanitize_option()` active for a network setting as well. Although I would
prefer to only run it if `$scope` is `site`, I'm not sure we can do that
without breaking something. Maybe we could deprecate the filter if a
network option is sanitized although I don't think I have ever seen
deprecated filters before...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35698#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list