Unyson - Version 2.4.2

Version Description

  • Allow containers without the type parameter in Customizer options
Download this release

Release Info

Developer Unyson
Plugin Icon 128x128 Unyson
Version 2.4.2
Comparing to
See all releases

Code changes from version 2.4.1 to 2.4.2

framework/core/class-fw-manifest.php CHANGED
@@ -373,8 +373,12 @@ class FW_Theme_Manifest extends FW_Manifest
373
  {
374
  $manifest_defaults = array(
375
  /**
376
- * You can use this in an option id,
377
- * so that option value will be different on a theme with different id
 
 
 
 
378
  */
379
  'id' => 'default',
380
  'supported_extensions' => array(
373
  {
374
  $manifest_defaults = array(
375
  /**
376
+ * You can use this in a wp_option id,
377
+ * so that option value will be different on a theme with different id.
378
+ *
379
+ * fixme: default value should be get_option( 'stylesheet' ) but it can't be changed now
380
+ * because there can be themes that has saved Theme Settings in wp_option: 'fw_theme_settings_options:default'
381
+ * changing this default value will result in Theme Settings options "reset".
382
  */
383
  'id' => 'default',
384
  'supported_extensions' => array(
framework/core/components/backend.php CHANGED
@@ -1795,9 +1795,22 @@ final class _FW_Component_Backend {
1795
  */
1796
  public function _action_enqueue_customizer_static()
1797
  {
1798
- fw()->backend->enqueue_options_static(
1799
- fw()->theme->get_customizer_options()
1800
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
1801
 
1802
  wp_enqueue_script(
1803
  'fw-backend-customizer',
1795
  */
1796
  public function _action_enqueue_customizer_static()
1797
  {
1798
+ {
1799
+ $options_for_enqueue = array();
1800
+ $customizer_options = fw()->theme->get_customizer_options();
1801
+
1802
+ /**
1803
+ * In customizer options is allowed to have container with unspecified (or not existing) 'type'
1804
+ * fw()->backend->enqueue_options_static() tries to enqueue both options and container static
1805
+ * not existing container types will throw notices.
1806
+ * To prevent that, extract and send it only options (without containers)
1807
+ */
1808
+ fw_collect_options($options_for_enqueue, $customizer_options);
1809
+
1810
+ fw()->backend->enqueue_options_static($options_for_enqueue);
1811
+
1812
+ unset($options_for_enqueue, $customizer_options);
1813
+ }
1814
 
1815
  wp_enqueue_script(
1816
  'fw-backend-customizer',
framework/helpers/general.php CHANGED
@@ -789,7 +789,12 @@ function fw_collect_options(&$result, &$options, $settings = array(), $_recursio
789
  if (
790
  is_array($settings['limit_container_types'])
791
  &&
792
- !in_array($option['type'], $settings['limit_container_types'])
 
 
 
 
 
793
  ) {
794
  break;
795
  }
789
  if (
790
  is_array($settings['limit_container_types'])
791
  &&
792
+ (
793
+ // Customizer options can contain options with not existing or empty $option['type']
794
+ empty($option['type'])
795
+ ||
796
+ !in_array($option['type'], $settings['limit_container_types'])
797
+ )
798
  ) {
799
  break;
800
  }
framework/manifest.php CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
- $manifest['version'] = '2.4.1';
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
+ $manifest['version'] = '2.4.2';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson, themefusecom
3
  Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio, framework
4
  Requires at least: 4.0.0
5
  Tested up to: 4.2
6
- Stable tag: 2.4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -82,6 +82,9 @@ Yes; Unyson will work with any theme.
82
 
83
  == Changelog ==
84
 
 
 
 
85
  = 2.4.1 =
86
  * Fixed [#742](https://github.com/ThemeFuse/Unyson/issues/742), [#731](https://github.com/ThemeFuse/Unyson/issues/731), [#728](https://github.com/ThemeFuse/Unyson/issues/728), [#726](https://github.com/ThemeFuse/Unyson/issues/726), [Shortcodes#29](https://github.com/ThemeFuse/Unyson-Shortcodes-Extension/issues/29)
87
  * Fixed: `addable-popup` option type wasn't saved in Customizer
3
  Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio, framework
4
  Requires at least: 4.0.0
5
  Tested up to: 4.2
6
+ Stable tag: 2.4.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
82
 
83
  == Changelog ==
84
 
85
+ = 2.4.2 =
86
+ * Allow containers without the `type` parameter in [Customizer options](http://manual.unyson.io/en/latest/options/introduction.html#customizer)
87
+
88
  = 2.4.1 =
89
  * Fixed [#742](https://github.com/ThemeFuse/Unyson/issues/742), [#731](https://github.com/ThemeFuse/Unyson/issues/731), [#728](https://github.com/ThemeFuse/Unyson/issues/728), [#726](https://github.com/ThemeFuse/Unyson/issues/726), [Shortcodes#29](https://github.com/ThemeFuse/Unyson-Shortcodes-Extension/issues/29)
90
  * Fixed: `addable-popup` option type wasn't saved in Customizer
unyson.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.themefuse.com/
5
  * Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
6
- * Version: 2.4.1
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.themefuse.com/
5
  * Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
6
+ * Version: 2.4.2
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+