Tweak how Customizer defaults are set so that checkboxes will work

This commit is contained in:
James Koster 2016-09-06 22:31:39 +01:00
parent 7ca8c09004
commit b9c6634d5b
4 changed files with 16 additions and 5 deletions

View file

@ -1,5 +1,13 @@
# Storefront Changelog
### *2016.xx.xx* - 2.1.2
* **Dev** - Tweaked how Customizer defaults are set so that checkboxes will work.
### *2016.09.02* - 2.1.1
* **Fix** - Changed some customizer settings transport from postMessage to refresh for live preview of changes.
* **Fix** - Secondary navigation dropdown styling.
* **Dev** - Restructured the way objects are initiated. Objects are now initiated into an accessible global $storefront for access to hooks. Kudos [@jtsternberg](https://github.com/jtsternberg).
### *2016.08.24* - 2.1.0
* **New** - Lots of SEO enhancements. Kudos [@opportus](https://github.com/opportus).
* **New** - Selective refresh on site title, tag line, logo and widgets.

View file

@ -80,12 +80,15 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
* @return string
*/
public function get_theme_mod_value( $value ) {
if ( $value ) {
$key = substr( current_filter(), 10 );
$set_theme_mods = get_theme_mods();
if ( isset( $set_theme_mods[ $key ] ) ) {
return $value;
}
$key = substr( current_filter(), 10 );
$values = self::get_storefront_default_setting_values();
$values = $this->setting_defaults();
return isset( $values[ $key ] ) ? $values[ $key ] : $value;
}

View file

@ -1,7 +1,7 @@
{
"name": "storefront",
"title": "Storefront",
"version": "2.1.1",
"version": "2.1.2",
"homepage": "https://woocommerce.com/storefront/",
"repository": {
"type": "git",

View file

@ -4,7 +4,7 @@ Theme URI: https://woocommerce.com/storefront
Author: WooThemes
Author URI: https://woocommerce.com/
Description: Storefront is the perfect theme for your next WooCommerce project. Designed and developed by WooCommerce Core developers, it features a bespoke integration with WooCommerce itself plus many of the most popular customer facing WooCommerce extensions. There are several layout & color options to personalise your shop, multiple widget regions, a responsive design and much more. Developers will love it's lean and extensible codebase making it a joy to customise and extend. Looking for a WooCommerce theme? Look no further!
Version: 2.1.1
Version: 2.1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: storefront