[wp-trac] [WordPress Trac] #36633: Customizer Doesn't Save Defaults in The Database for a Theme
WordPress Trac
noreply at wordpress.org
Fri Apr 22 12:45:19 UTC 2016
#36633: Customizer Doesn't Save Defaults in The Database for a Theme
--------------------------------+------------------------------
Reporter: mrahmadawais | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: normal | Resolution: wontfix
Keywords: dev-feedback close | Focuses:
--------------------------------+------------------------------
Changes (by kuus):
* keywords: dev-feedback 2nd-opinion => dev-feedback close
* status: new => closed
* resolution: => wontfix
Comment:
Hello, for what I understood from your comment this is not a bug and does
not have anything to do with the customizer. Default values are not meant
to be stored in the database, in fact themes should use ''''sane
defaults'''' (see article https://make.wordpress.org/themes/2014/07/09
/using-sane-defaults-in-themes/).
In your specific case I guess you should simply show the social box unless
the value retrieved is true, for instance (pseudo code): `<?php if ( !
get_theme_mod('hide_box') ) { ?>box template<?php } ?>`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36633#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list