[wp-trac] [WordPress Trac] #48747: WP_Customize_Setting doesn't clean up after itself
WordPress Trac
noreply at wordpress.org
Fri Nov 22 04:53:56 UTC 2019
#48747: WP_Customize_Setting doesn't clean up after itself
-------------------------------------------------+-------------------------
Reporter: jon81 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Customize | Version: 3.4
Severity: minor | Resolution:
Keywords: dev-feedback has-patch reporter- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by jon81):
Hey @dlh, to give a bit of context to what I working on:-
I wanted to replace some of the color controls defined in the parent
theme, with a control that supports rgba
([https://github.com/BraadMartin/components/tree/master/alpha-color-picker
Alpha Color Picker]), I was coming unstuck with `sanitize_hex_color`
running before/instead-of my own sanitize callback.
The patch you suggested would make it easier to remove the sanitize
filter, though I feel it's use would only be apparent after one has
discovered the issue hand. Now that I know what the problem is I can
workaround it myself.
I think what Weston suggested would be the way to go if possible, have
filters added when needed, rather than in the constructor.. that way I
could presumable remove a setting in the `customize_register` hook before
any filters have been added.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48747#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list