[wp-trac] [WordPress Trac] #28637: get_theme_mod returns empty string instead of default
WordPress Trac
noreply at wordpress.org
Wed Aug 19 18:30:39 UTC 2015
#28637: get_theme_mod returns empty string instead of default
----------------------------------------+-----------------------------
Reporter: philipjohn | Owner: valendesigns
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4
Component: Customize | Version: 3.9.1
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: administration
----------------------------------------+-----------------------------
Comment (by MikeHansenMe):
So I think some of the confusion is because the example talks about
removing an image and using the default. I think that is correct but I
think we should fix that elsewhere. I see the problem now how a blanket
change like this could have side effects. So we have 2 issues
1) in customizer it sets the theme_mod to an empty string when removed
(need to find a core example)
2) get_theme_mod returns and empty string. (which I think is valid in
other use cases, so we cant make the change in the patch)
I will write some unit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28637#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list