[wp-trac] [WordPress Trac] #36952: get_theme_mod called when getting the root value of a custom type
WordPress Trac
noreply at wordpress.org
Sat Jan 28 18:10:45 UTC 2017
#36952: get_theme_mod called when getting the root value of a custom type
--------------------------------------+-----------------------
Reporter: jontis | Owner: dlh
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7.3
Component: Customize | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Changes (by dlh):
* keywords: has-patch needs-unit-tests => has-patch has-unit-tests
Comment:
[attachment:36952.2.diff] amends the `WP_Customize_Setting` tests so that
they trigger the bug in `get_root_value()`.
Currently, core calls `set_root_value()` only in
`WP_Customize_Setting::update()`, and even then, only after checking
whether `'option' === $this->type || 'theme_mod' === $this->type`. So, I
think only a setting class with custom logic could trigger the
`set_root_value()` bug. Let me know if you'd like me to add one to the
tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36952#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list