WordPress Customization API — Checkbox Default, Driving me insane.
-
I’ve currently got a custom theme I developed, which, is being used on about 35 client sites. I really want to push out a new feature (which will be pushed out to the clients via WordPress native updates) but I’m having an issue with the customization API bit. I’m adding a conditional that will allow them to show/hide a brand new section of the theme based on if they have a box in Appearance > Customize checked. The feature works fine, and, it’s ready to roll out — but I’m having an issue when it does roll out that it installs with the new section enabled right away, which, is a no go — especially because it covers up a different aspect of the theme.
Here’s (one) of the snippets I’m using that do exactly this above, but, are being pushed out as enabled (when it should be just added as an option silently, aka disabled):
http://pastie.org/private/4gx59ins3vsjvehkgje4bgI’ve tried “0” for the default value as well as “false”. I’m sure this is something simple, but, I’m having a brain dead moment about this and I find that looking around online for anything with the Customization API is a total pain.
If anyone can help me out, that’d be amazing! 🙂
The topic ‘WordPress Customization API — Checkbox Default, Driving me insane.’ is closed to new replies.