[wp-trac] [WordPress Trac] #19910: Appearance Improvements: Theme Customization Frame
WordPress Trac
wp-trac at lists.automattic.com
Sat May 5 19:51:46 UTC 2012
#19910: Appearance Improvements: Theme Customization Frame
-------------------------------------+--------------------------
Reporter: koopersmith | Owner: koopersmith
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 3.4
Component: Appearance | Version: 3.3.1
Severity: normal | Resolution:
Keywords: dev-feedback needs-docs |
-------------------------------------+--------------------------
Comment (by Otto42):
Replying to [comment:23 chipbennett]:
> For `option` type settings, that correspond to settings added as an
array via `register_setting()`, is there any way to pass them through the
`register_setting()` `$sanitize_callback` on-save? Seems that might be
more flexible/scalable than requiring a `sanitize_callback` option for
each `$wp_customize->add_setting()` call.
Looks like I gave you bad info before, Chip. Options that are added via
register_setting *do* get their validation callback ran across them, even
when being saved via the theme customizer.
This is because register_setting actually adds the validation function as
a filter to sanitize_option_{$option_name}, so regardless of the method by
which the option is updated, the sanitize function will still run on its
contents.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19910#comment:24>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list