Unyson - Version 2.6.5

Version Description

  • Minor fixes
Download this release

Release Info

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

Code changes from version 2.6.4 to 2.6.5

framework/core/components/extensions.php CHANGED
@@ -92,23 +92,8 @@ final class _FW_Component_Extensions
92
  {
93
  require dirname(__FILE__) .'/extensions/class-fw-extension-default.php';
94
 
95
- if (
96
- /**
97
- * Do not load in frontend because it has no functionality that can be useful in frontend
98
- */
99
- is_admin()
100
- ||
101
- /**
102
- * While in cron request (on auto-update), is_admin() is false
103
- * but we need the actions that moves extensions to a tmp dir then back, on plugin update
104
- * todo: maybe move those actions here in this class?
105
- */
106
- defined( 'DOING_CRON' )
107
- ) {
108
- require dirname(__FILE__) .'/extensions/manager/class--fw-extensions-manager.php';
109
-
110
- $this->manager = new _FW_Extensions_Manager();
111
- }
112
  }
113
 
114
  /**
92
  {
93
  require dirname(__FILE__) .'/extensions/class-fw-extension-default.php';
94
 
95
+ require dirname(__FILE__) .'/extensions/manager/class--fw-extensions-manager.php';
96
+ $this->manager = new _FW_Extensions_Manager();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
 
99
  /**
framework/core/components/extensions/manager/class--fw-extensions-manager.php CHANGED
@@ -55,6 +55,9 @@ final class _FW_Extensions_Manager
55
  add_action('upgrader_process_complete', array($this, '_action_theme_available_extensions_restore'), 999, 2);
56
  }
57
 
 
 
 
58
  if (!is_admin()) {
59
  return;
60
  }
@@ -70,8 +73,6 @@ final class _FW_Extensions_Manager
70
  add_action('network_admin_menu', array($this, '_action_admin_menu'));
71
  add_action('admin_footer', array($this, '_action_admin_footer'));
72
  add_action('admin_enqueue_scripts', array($this, '_action_enqueue_scripts'));
73
- add_action('fw_after_plugin_activate', array($this, '_action_after_plugin_activate'), 100);
74
- add_action('after_switch_theme', array($this, '_action_theme_switch'));
75
  add_action('admin_notices', array($this, '_action_admin_notices'));
76
 
77
  if ($this->can_install()) {
@@ -383,13 +384,9 @@ final class _FW_Extensions_Manager
383
  )
384
  );
385
 
386
- if ($this->can_install()) {
387
- if ($this->get_supported_extensions_for_install()) {
388
- $link = $this->get_link();
389
-
390
- wp_redirect($link . '&sub-page=install&supported');
391
- exit;
392
- }
393
  }
394
  }
395
 
55
  add_action('upgrader_process_complete', array($this, '_action_theme_available_extensions_restore'), 999, 2);
56
  }
57
 
58
+ add_action('fw_after_plugin_activate', array($this, '_action_after_plugin_activate'), 100);
59
+ add_action('after_switch_theme', array($this, '_action_theme_switch'));
60
+
61
  if (!is_admin()) {
62
  return;
63
  }
73
  add_action('network_admin_menu', array($this, '_action_admin_menu'));
74
  add_action('admin_footer', array($this, '_action_admin_footer'));
75
  add_action('admin_enqueue_scripts', array($this, '_action_enqueue_scripts'));
 
 
76
  add_action('admin_notices', array($this, '_action_admin_notices'));
77
 
78
  if ($this->can_install()) {
384
  )
385
  );
386
 
387
+ if (is_admin() && $this->can_install() && $this->get_supported_extensions_for_install()) {
388
+ wp_redirect($this->get_link() . '&sub-page=install&supported');
389
+ exit;
 
 
 
 
390
  }
391
  }
392
 
framework/helpers/class-fw-file-cache.php CHANGED
@@ -48,6 +48,25 @@ class FW_File_Cache {
48
  */
49
  private static $blog_id;
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  private static function get_defaults() {
52
  return array(
53
  'created' => time(),
@@ -70,7 +89,7 @@ class FW_File_Cache {
70
 
71
  $dir = dirname(self::get_path());
72
  $path = self::get_path();
73
- $code = '<?php return array();';
74
  $shhh = defined('DOING_AJAX') && DOING_AJAX; // prevent warning in ajax requests
75
 
76
  // prevent useless multiple execution of this method when uploads/ is not writable
@@ -114,7 +133,7 @@ class FW_File_Cache {
114
  return false; // cannot create the file
115
  }
116
 
117
- self::$cache = include $path;
118
 
119
  // check the loaded cache
120
  {
@@ -182,10 +201,14 @@ class FW_File_Cache {
182
 
183
  if (!(
184
  $shhh
185
- ? @file_put_contents(self::get_path(), '<?php return ' . var_export(self::$cache, true) . ';', LOCK_EX)
186
- : file_put_contents(self::get_path(), '<?php return ' . var_export(self::$cache, true) . ';', LOCK_EX)
 
 
 
 
187
  )) {
188
- @file_put_contents(self::get_path(), '<?php return array();', LOCK_EX);
189
  }
190
 
191
  self::$changed = false;
48
  */
49
  private static $blog_id;
50
 
51
+ /**
52
+ * Even if we use LOCK_EX in file_put_contents() sometimes a write happens over another
53
+ * and the file cache is corrupted resulting in fatal error on the site
54
+ *
55
+ * 'some-key' => 'some-val',
56
+ * ); // here the file must end, but it contains old array content
57
+ * 'some-old-key' => 'some-old-val',
58
+ *
59
+ * adding ' /* ' at the end of the array fixes the problem
60
+ *
61
+ * 'some-key' => 'some-val',
62
+ * ); /*
63
+ * 'some-old-key' => 'some-old-val', // these will be commented
64
+ *
65
+ * It produces a php warning but we hide it using `@ include '/path/to/file-cache.php';`
66
+ * @var string
67
+ */
68
+ private static $content_end = ' /* ';
69
+
70
  private static function get_defaults() {
71
  return array(
72
  'created' => time(),
89
 
90
  $dir = dirname(self::get_path());
91
  $path = self::get_path();
92
+ $code = '<?php return array();'. self::$content_end;
93
  $shhh = defined('DOING_AJAX') && DOING_AJAX; // prevent warning in ajax requests
94
 
95
  // prevent useless multiple execution of this method when uploads/ is not writable
133
  return false; // cannot create the file
134
  }
135
 
136
+ self::$cache = @include($path); // use @ because this file contains unterminated comment /*
137
 
138
  // check the loaded cache
139
  {
201
 
202
  if (!(
203
  $shhh
204
+ ? @file_put_contents(self::get_path(),
205
+ '<?php return '. var_export(self::$cache, true) .';'. self::$content_end,
206
+ LOCK_EX)
207
+ : file_put_contents(self::get_path(),
208
+ '<?php return '. var_export(self::$cache, true) .';'. self::$content_end,
209
+ LOCK_EX)
210
  )) {
211
+ @file_put_contents(self::get_path(), '<?php return array();'. self::$content_end, LOCK_EX);
212
  }
213
 
214
  self::$changed = false;
framework/includes/hooks.php CHANGED
@@ -36,7 +36,7 @@
36
  if ('FW_Option_Type' === $class) {
37
  require_once dirname(__FILE__) .'/../core/extends/class-fw-option-type.php';
38
 
39
- if (is_admin()) {
40
  FW_Flash_Messages::add(
41
  'option-type-register-wrong',
42
  __("Please register option-types on 'fw_option_types_init' action", 'fw'),
@@ -46,7 +46,7 @@
46
  } elseif ('FW_Container_Type' === $class) {
47
  require_once dirname(__FILE__) .'/../core/extends/class-fw-container-type.php';
48
 
49
- if (is_admin()) {
50
  FW_Flash_Messages::add(
51
  'container-type-register-wrong',
52
  __("Please register container-types on 'fw_container_types_init' action", 'fw'),
36
  if ('FW_Option_Type' === $class) {
37
  require_once dirname(__FILE__) .'/../core/extends/class-fw-option-type.php';
38
 
39
+ if (is_admin() && defined('WP_DEBUG') && WP_DEBUG) {
40
  FW_Flash_Messages::add(
41
  'option-type-register-wrong',
42
  __("Please register option-types on 'fw_option_types_init' action", 'fw'),
46
  } elseif ('FW_Container_Type' === $class) {
47
  require_once dirname(__FILE__) .'/../core/extends/class-fw-container-type.php';
48
 
49
+ if (is_admin() && defined('WP_DEBUG') && WP_DEBUG) {
50
  FW_Flash_Messages::add(
51
  'container-type-register-wrong',
52
  __("Please register container-types on 'fw_container_types_init' action", 'fw'),
framework/manifest.php CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
- $manifest['version'] = '2.6.4';
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
+ $manifest['version'] = '2.6.5';
framework/static/css/option-types.css CHANGED
@@ -130,12 +130,15 @@ body.rtl .fw-option-type-radio.fw-option-type-radio-inline > div:not(:last-child
130
  .fw-modal .media-frame input[type=search],
131
  .fw-modal .media-frame input[type=email],
132
  .fw-modal .media-frame input[type=text],
133
- .fw-modal .media-frame input[type=url],
134
- .fw-modal .media-frame textarea {
135
  height: 28px;
136
  padding: 3px 5px;
137
  }
138
 
 
 
 
 
139
  .fw-modal .media-frame textarea.code {
140
  line-height: 1.4;
141
  }
130
  .fw-modal .media-frame input[type=search],
131
  .fw-modal .media-frame input[type=email],
132
  .fw-modal .media-frame input[type=text],
133
+ .fw-modal .media-frame input[type=url] {
 
134
  height: 28px;
135
  padding: 3px 5px;
136
  }
137
 
138
+ .fw-modal .media-frame textarea {
139
+ padding: 3px 5px;
140
+ }
141
+
142
  .fw-modal .media-frame textarea.code {
143
  line-height: 1.4;
144
  }
framework/static/js/fw.js CHANGED
@@ -1129,7 +1129,7 @@ fw.getValuesFromServer = function (data) {
1129
  * user completed the form with data and wants to submit data
1130
  * do not delete all his work
1131
  */
1132
- alert(status +': '+ error.message);
1133
  }
1134
  });
1135
  }
@@ -1161,7 +1161,7 @@ fw.getValuesFromServer = function (data) {
1161
  */
1162
  values: {},
1163
 
1164
- silentReceiveOfDefaultValues: false
1165
  }
1166
  ),
1167
  initializeFrame: function(settings) {
@@ -1330,7 +1330,7 @@ fw.getValuesFromServer = function (data) {
1330
  error: function (xhr, status, error) {
1331
  fw.loading.hide(fwLoadingId);
1332
 
1333
- modal.set('html', status+ ': '+ error.message);
1334
  }
1335
  });
1336
  }
1129
  * user completed the form with data and wants to submit data
1130
  * do not delete all his work
1131
  */
1132
+ alert(status +': '+ String(error));
1133
  }
1134
  });
1135
  }
1161
  */
1162
  values: {},
1163
 
1164
+ silentReceiveOfDefaultValues: true
1165
  }
1166
  ),
1167
  initializeFrame: function(settings) {
1330
  error: function (xhr, status, error) {
1331
  fw.loading.hide(fwLoadingId);
1332
 
1333
+ modal.set('html', status+ ': '+ String(error));
1334
  }
1335
  });
1336
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson
3
  Tags: page builder, 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.4
5
  Tested up to: 4.6
6
- Stable tag: 2.6.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -83,6 +83,9 @@ Yes; Unyson will work with any theme.
83
 
84
  == Changelog ==
85
 
 
 
 
86
  = 2.6.4 =
87
  * Fixed [#2000](https://github.com/ThemeFuse/Unyson/issues/2000)
88
 
3
  Tags: page builder, 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.4
5
  Tested up to: 4.6
6
+ Stable tag: 2.6.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.6.5 =
87
+ * [Minor fixes](https://github.com/ThemeFuse/Unyson/compare/v2.6.4...v2.6.5)
88
+
89
  = 2.6.4 =
90
  * Fixed [#2000](https://github.com/ThemeFuse/Unyson/issues/2000)
91
 
unyson.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.io/
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.6.4
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.io/
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.6.5
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+