[wp-trac] [WordPress Trac] #34843: Customizer: allow themes in the Customizer to be disabled by plugins
WordPress Trac
noreply at wordpress.org
Fri Dec 4 06:13:00 UTC 2015
#34843: Customizer: allow themes in the Customizer to be disabled by plugins
----------------------------------------+-----------------------------
Reporter: mattwiebe | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses:
----------------------------------------+-----------------------------
Comment (by nacin):
Unfortunately this filter should have passed `null` and allowed an empty
array to be returned back all the way through.
There are 38 filters in core that pass an `array()` as the first argument,
but this is the only one that is explicitly labeled a `pre` hook. 23 other
filters pass null or false. So this is definitely an unfortunate
exception.
Sounds like the best workaround here, @mattwiebe, would be to return back
exactly one theme — the current one, which is almost surely already in
local cache — then otherwise unhook the control.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34843#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list