[wp-trac] [WordPress Trac] #34290: Not possible to have a percent symbol contained in the default value of a theme_mod
WordPress Trac
noreply at wordpress.org
Wed Oct 14 18:03:37 UTC 2015
#34290: Not possible to have a percent symbol contained in the default value of a
theme_mod
--------------------------+-----------------------------------------
Reporter: kuus | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript, administration
--------------------------+-----------------------------------------
Changes (by westonruter):
* keywords: => needs-patch
* milestone: Awaiting Review => Future Release
Comment:
Interesting issue. I'm not sure if this is something that should be
accounted for in the Customizer or if it is just an idiosyncrasy for how
theme mods work. Since it is `get_theme_mod()` that is doing the
`sprintf()`, then I'm inclined to the former latter. The only alternative
I can think of is for the Customizer to explicitly `str_replace( '%',
'%%', $setting->default)` when it is accessing a theme mod's default
value, but that could have other unintended consequences.
Would be worth a patch to explore what can be done.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34290#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list