[wp-trac] [WordPress Trac] #35698: Distinguish between regular (site) options and network options in `sanitize_option()`
WordPress Trac
noreply at wordpress.org
Thu Apr 14 04:50:02 UTC 2016
#35698: Distinguish between regular (site) options and network options in
`sanitize_option()`
----------------------------------------+------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.6
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: multisite
----------------------------------------+------------------------
Comment (by jeremyfelt):
This is looking good, @flixos90.
I'm pausing a bit on the `sanitize_site_option_` filter only because we
still support the `_site_option()` functions and that may lead to some
confusion.
Would it be strange to do something like
`sanitize_{$context}_context_option_{$option}` to clarify that
sanitization is happening in a specific context?
Another option may be to pass `$context` as another parameter to
`sanitize_option_{$option}` so that it's available for those who need it.
Core's use is probably more concerned with the actual `$context` parameter
and how that determines where to fallback when an error is encountered.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35698#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list