Unyson - Version 2.4.13

Version Description

  • IMPORTANT!!! Updating from v2.4.12 to any newer version will uninstall all extensions #1105

    We are very sorry

    To install all extensions compatible with your theme, open the following link:

    {site.domain}/wp-admin/admin.php?page=fw-extensions&sub-page=install&supported
    
  • Fixed #1089, #1077

Download this release

Release Info

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

Code changes from version 2.4.12 to 2.4.13

framework/core/components/extensions/manager/class--fw-extensions-manager.php CHANGED
@@ -50,6 +50,7 @@ final class _FW_Extensions_Manager
50
  add_action('admin_enqueue_scripts', array($this, '_action_enqueue_scripts'));
51
  add_action('fw_after_plugin_activate', array($this, '_action_after_plugin_activate'), 100);
52
  add_action('after_switch_theme', array($this, '_action_theme_switch'));
 
53
 
54
  if ($this->can_install()) {
55
  add_action('wp_ajax_fw_extensions_check_direct_fs_access', array($this, '_action_ajax_check_direct_fs_access'));
@@ -3174,4 +3175,26 @@ final class _FW_Extensions_Manager
3174
 
3175
  return $extensions;
3176
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3177
  }
50
  add_action('admin_enqueue_scripts', array($this, '_action_enqueue_scripts'));
51
  add_action('fw_after_plugin_activate', array($this, '_action_after_plugin_activate'), 100);
52
  add_action('after_switch_theme', array($this, '_action_theme_switch'));
53
+ add_action('admin_notices', array($this, '_action_admin_notices'));
54
 
55
  if ($this->can_install()) {
56
  add_action('wp_ajax_fw_extensions_check_direct_fs_access', array($this, '_action_ajax_check_direct_fs_access'));
3175
 
3176
  return $extensions;
3177
  }
3178
+
3179
+ public function _action_admin_notices() {
3180
+ /**
3181
+ * In v2.4.12 was done a terrible mistake https://github.com/ThemeFuse/Unyson-Extensions-Approval/issues/160
3182
+ * Show a warning with link to install theme supported extensions
3183
+ */
3184
+ if (
3185
+ !isset($_GET['supported']) // already on 'Install Supported Extensions' page
3186
+ &&
3187
+ fw()->manifest->get_version() === '2.4.13'
3188
+ &&
3189
+ $this->can_install()
3190
+ &&
3191
+ $this->get_supported_extensions_for_install()
3192
+ ) {
3193
+ echo '<div class="'. (fw_ext('page-builder') ? 'update-nag' : 'error') .'"> <p>';
3194
+ echo fw_html_tag('a', array(
3195
+ 'href' => $this->get_link() .'&sub-page=install&supported',
3196
+ ), __('Install theme compatible extensions', 'fw'));
3197
+ echo '</p></div>';
3198
+ }
3199
+ }
3200
  }
framework/includes/option-types/icon/class-fw-option-type-icon.php CHANGED
@@ -47,20 +47,25 @@ class FW_Option_Type_Icon extends FW_Option_Type
47
 
48
  unset($sets);
49
 
50
- /**
51
- * user hash as array key instead of src, because src can be a very long data-url string
52
- */
53
- $style_hash = md5($set['font-style-src']);
54
-
55
- if (!isset($this->enqueued_font_styles[ $style_hash ])) {
56
- wp_enqueue_style(
57
- "fw-option-type-{$this->get_type()}-font-{$option['set']}",
58
- $set['font-style-src'],
59
- array(),
60
- fw()->manifest->get_version()
61
- );
62
-
63
- $this->enqueued_font_styles[ $style_hash ] = true;
 
 
 
 
 
64
  }
65
  }
66
 
47
 
48
  unset($sets);
49
 
50
+ $font_style_sources = (array) $set['font-style-src'];
51
+
52
+ foreach($font_style_sources as $key => $style_source) {
53
+
54
+ /**
55
+ * user hash as array key instead of src, because src can be a very long data-url string
56
+ */
57
+ $style_hash = md5($style_source);
58
+
59
+ if (!isset($this->enqueued_font_styles[ $style_hash ])) {
60
+ wp_enqueue_style(
61
+ "fw-option-type-{$this->get_type()}-font-{$option['set']}-{$style_hash}",
62
+ $style_source,
63
+ array(),
64
+ fw()->manifest->get_version()
65
+ );
66
+
67
+ $this->enqueued_font_styles[ $style_hash ] = true;
68
+ }
69
  }
70
  }
71
 
framework/manifest.php CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
- $manifest['version'] = '2.4.12';
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
+ $manifest['version'] = '2.4.13';
framework/static/js/fw-events.js CHANGED
@@ -41,6 +41,14 @@ var fwEvents = new (function(){
41
  }
42
  }
43
 
 
 
 
 
 
 
 
 
44
  /**
45
  * Enable/Disable Debug
46
  * @param {Boolean} enabled
41
  }
42
  }
43
 
44
+ /**
45
+ * Make log helper public
46
+ *
47
+ * @param {String} [message]
48
+ * @param {Object} [data]
49
+ */
50
+ this.log = log;
51
+
52
  /**
53
  * Enable/Disable Debug
54
  * @param {Boolean} enabled
framework/static/js/fw.js CHANGED
@@ -294,6 +294,10 @@ fw.md5 = (function(){
294
  this.$modal.removeClass(this.current.customClass);
295
  }
296
 
 
 
 
 
297
  this.current = this.queue.shift();
298
 
299
  if (!this.current) {
@@ -399,6 +403,10 @@ fw.md5 = (function(){
399
  this.$modal.removeClass(this.current.customClass);
400
  }
401
 
 
 
 
 
402
  this.current = null;
403
 
404
  this.show();
@@ -1597,6 +1605,39 @@ fw.soleModal = (function(){
1597
  $getContent: function() {
1598
  return this.$modal.find('.fw-sole-modal-content:first');
1599
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1600
  setContent: function(html) {
1601
  this.lazyInit();
1602
 
@@ -1670,6 +1711,7 @@ fw.soleModal = (function(){
1670
  height: 200,
1671
  hidePrevious: false,
1672
  updateIfCurrent: false,
 
1673
  backdrop: null,
1674
  customClass: null,
1675
  afterOpen: function(){},
@@ -1704,6 +1746,10 @@ fw.soleModal = (function(){
1704
  this.$modal.removeClass(this.current.customClass);
1705
  }
1706
 
 
 
 
 
1707
  this.current = this.queue.shift();
1708
 
1709
  if (this.$modal && this.current.customClass !== null) {
@@ -1712,6 +1758,10 @@ fw.soleModal = (function(){
1712
 
1713
  this.setContent(this.current.html);
1714
 
 
 
 
 
1715
  return true;
1716
  } else {
1717
  return false;
@@ -1722,6 +1772,10 @@ fw.soleModal = (function(){
1722
  this.$modal.removeClass(this.current.customClass);
1723
  }
1724
 
 
 
 
 
1725
  this.currentMethod = '';
1726
  this.current = this.queue.shift();
1727
 
@@ -1751,6 +1805,10 @@ fw.soleModal = (function(){
1751
  this.$modal.addClass(this.current.customClass);
1752
  }
1753
 
 
 
 
 
1754
  this.$modal.css('display', '');
1755
 
1756
  this.setSize(this.current.width, this.current.height);
@@ -1821,6 +1879,10 @@ fw.soleModal = (function(){
1821
  this.$modal.removeClass(this.current.customClass);
1822
  }
1823
 
 
 
 
 
1824
  this.currentMethod = '';
1825
  this.current = null;
1826
  this.show();
@@ -1846,6 +1908,10 @@ fw.soleModal = (function(){
1846
  this.$modal.removeClass(this.current.customClass);
1847
  }
1848
 
 
 
 
 
1849
  this.setContent('');
1850
 
1851
  this.current = null;
294
  this.$modal.removeClass(this.current.customClass);
295
  }
296
 
297
+ if (this.$modal && ! this.current.wrapWithTable) {
298
+ this.wrapWithTable(this.$modal);
299
+ }
300
+
301
  this.current = this.queue.shift();
302
 
303
  if (!this.current) {
403
  this.$modal.removeClass(this.current.customClass);
404
  }
405
 
406
+ if (this.$modal && ! this.current.wrapWithTable) {
407
+ this.wrapWithTable(this.$modal);
408
+ }
409
+
410
  this.current = null;
411
 
412
  this.show();
1605
  $getContent: function() {
1606
  return this.$modal.find('.fw-sole-modal-content:first');
1607
  },
1608
+ wrapWithTable: function ($modal) {
1609
+ var temporaryContent = $modal.find('.fw-sole-modal-content').html();
1610
+
1611
+ $modal.find('.fw-sole-modal-content').remove();
1612
+
1613
+ var htmlTemplate =
1614
+ '<tbody>' +
1615
+ '<tr>' +
1616
+ '<td valign="middle" class="fw-sole-modal-content fw-text-center">' +
1617
+ temporaryContent +
1618
+ '</td>' +
1619
+ '</tr>' +
1620
+ '</tbody>';
1621
+
1622
+ var $table = jQuery('<table>', {
1623
+ html: htmlTemplate
1624
+ }).attr({width: '100%', height: '100%'});
1625
+
1626
+ $modal.find('.media-modal-content').append($table);
1627
+ },
1628
+ unwrapWithTable: function ($modal) {
1629
+ var temporaryContent = $modal.find('.fw-sole-modal-content').html();
1630
+
1631
+ $modal.find('.fw-sole-modal-content')
1632
+ .closest('table')
1633
+ .remove();
1634
+
1635
+ $modal.find('.media-modal-content')
1636
+ .append(jQuery('<div>', {
1637
+ class: 'fw-sole-modal-content',
1638
+ html: temporaryContent
1639
+ }));
1640
+ },
1641
  setContent: function(html) {
1642
  this.lazyInit();
1643
 
1711
  height: 200,
1712
  hidePrevious: false,
1713
  updateIfCurrent: false,
1714
+ wrapWithTable: true,
1715
  backdrop: null,
1716
  customClass: null,
1717
  afterOpen: function(){},
1746
  this.$modal.removeClass(this.current.customClass);
1747
  }
1748
 
1749
+ if (this.$modal && ! this.current.wrapWithTable) {
1750
+ this.wrapWithTable(this.$modal);
1751
+ }
1752
+
1753
  this.current = this.queue.shift();
1754
 
1755
  if (this.$modal && this.current.customClass !== null) {
1758
 
1759
  this.setContent(this.current.html);
1760
 
1761
+ if (this.$modal && ! this.current.wrapWithTable) {
1762
+ this.unwrapWithTable(this.$modal);
1763
+ }
1764
+
1765
  return true;
1766
  } else {
1767
  return false;
1772
  this.$modal.removeClass(this.current.customClass);
1773
  }
1774
 
1775
+ if (this.current && this.$modal && ! this.current.wrapWithTable) {
1776
+ this.unwrapWithTable(this.$modal);
1777
+ }
1778
+
1779
  this.currentMethod = '';
1780
  this.current = this.queue.shift();
1781
 
1805
  this.$modal.addClass(this.current.customClass);
1806
  }
1807
 
1808
+ if (this.$modal && ! this.current.wrapWithTable) {
1809
+ this.unwrapWithTable(this.$modal);
1810
+ }
1811
+
1812
  this.$modal.css('display', '');
1813
 
1814
  this.setSize(this.current.width, this.current.height);
1879
  this.$modal.removeClass(this.current.customClass);
1880
  }
1881
 
1882
+ if (this.$modal && ! this.current.wrapWithTable) {
1883
+ this.wrapWithTable(this.$modal);
1884
+ }
1885
+
1886
  this.currentMethod = '';
1887
  this.current = null;
1888
  this.show();
1908
  this.$modal.removeClass(this.current.customClass);
1909
  }
1910
 
1911
+ if (this.$modal && ! this.current.wrapWithTable) {
1912
+ this.wrapWithTable(this.$modal);
1913
+ }
1914
+
1915
  this.setContent('');
1916
 
1917
  this.current = null;
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.4
6
- Stable tag: 2.4.12
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -18,15 +18,16 @@ A simple and easy way to build a powerful website.
18
  **Features include:**
19
 
20
  * **Drag & Drop Page Builder.** Create countless pages using the content and media shortcodes.
21
- * **Sidebars.** This module will let your users customize WordPress pages with dynamic sidebars.
22
- * **Backup.** Your users will be able to create backups directly from the WordPress admin.
23
  * **Sliders.** To make you life even easier we have already built in 3 of them that support images and videos.
24
- * **SEO.** SEO settings at finger tips without installing further plugins.
25
- * **Breadcrumbs.** A pretty small module that will really come in handy when you’ll want to navigate your website faster.
26
- * **Events.** It's pretty simple to use and it has Calendar and Map shortcodes.
27
  * **Portfolio.** Portfolio has some pretty neat filtering animations.
 
 
 
28
  * **Feedback.** We've added a way for users to submit reviews and ratings for events, projects, etc.
29
- * **Learning.** Create courses, lessons and quizzes for your online training site.
 
30
 
31
  To get started, check out the [Scratch Theme](https://github.com/ThemeFuse/Scratch-Theme).
32
 
@@ -82,6 +83,19 @@ Yes; Unyson will work with any theme.
82
 
83
  == Changelog ==
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  = 2.4.12 =
86
  * WordPress 4.4 fixes
87
  * Fixed
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.4
6
+ Stable tag: 2.4.13
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
18
  **Features include:**
19
 
20
  * **Drag & Drop Page Builder.** Create countless pages using the content and media shortcodes.
 
 
21
  * **Sliders.** To make you life even easier we have already built in 3 of them that support images and videos.
22
+ * **Mega Menu.** User-friendly drop down menu that will let you easily create highly customized menu configurations.
23
+ * **Sidebars.** This module will let your users customize WordPress pages with dynamic sidebars.
 
24
  * **Portfolio.** Portfolio has some pretty neat filtering animations.
25
+ * **Breadcrumbs.** A pretty small module that will really come in handy when you’ll want to navigate your website faster.
26
+ * **Forms** Use the drag & drop form builder to create any contact form you'll ever want or need.
27
+ * **SEO.** SEO settings at finger tips without installing further plugins.
28
  * **Feedback.** We've added a way for users to submit reviews and ratings for events, projects, etc.
29
+ * **Events.** It's pretty simple to use and it has Calendar and Map shortcodes.
30
+ * **Backup & Demo Content.** Create an automated backup schedule, import demo content or even create a demo content archive for migration purposes.
31
 
32
  To get started, check out the [Scratch Theme](https://github.com/ThemeFuse/Scratch-Theme).
33
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.4.13 =
87
+ * **IMPORTANT!!!** Updating from v2.4.12 to any newer version will uninstall all extensions [#1105](https://github.com/ThemeFuse/Unyson/issues/1105#issuecomment-163966468)
88
+
89
+ We are very sorry
90
+
91
+ To install all extensions compatible with your theme, open the following link:
92
+
93
+ ```
94
+ {site.domain}/wp-admin/admin.php?page=fw-extensions&sub-page=install&supported
95
+ ```
96
+
97
+ * Fixed [#1089](https://github.com/ThemeFuse/Unyson/issues/1089), [#1077](https://github.com/ThemeFuse/Unyson/pull/1077#issuecomment-163324948)
98
+
99
  = 2.4.12 =
100
  * WordPress 4.4 fixes
101
  * Fixed
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.4.12
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+
@@ -123,5 +123,64 @@ if (defined('FW')) {
123
  return dirname( __FILE__ ) . '/tmp';
124
  }
125
  add_filter( 'fw_tmp_dir', '_filter_fw_tmp_dir' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  }
127
  }
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.4.13
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+
123
  return dirname( __FILE__ ) . '/tmp';
124
  }
125
  add_filter( 'fw_tmp_dir', '_filter_fw_tmp_dir' );
126
+
127
+ /** @internal */
128
+ final class _FW_Update_Hooks {
129
+ public static function _init() {
130
+ add_filter( 'upgrader_pre_install', array(__CLASS__, '_filter_fw_check_if_plugin_pre_update'), 9999, 2 );
131
+ add_filter( 'upgrader_post_install', array(__CLASS__, '_filter_fw_check_if_plugin_post_update'), 9999, 2 );
132
+ add_action( 'automatic_updates_complete', array(__CLASS__, '_action_fw_automatic_updates_complete') );
133
+ }
134
+
135
+ public static function _filter_fw_check_if_plugin_pre_update( $result, $data ) {
136
+ if (
137
+ !is_wp_error($result)
138
+ &&
139
+ isset( $data['plugin'] )
140
+ &&
141
+ plugin_basename( __FILE__ ) === $data['plugin']
142
+ ) {
143
+ /**
144
+ * Before plugin update
145
+ * The plugin was already download and extracted to a temp directory
146
+ * and it's right before being replaced with the new downloaded version
147
+ */
148
+ do_action( 'fw_plugin_pre_update' );
149
+ }
150
+
151
+ return $result;
152
+ }
153
+
154
+ public static function _filter_fw_check_if_plugin_post_update( $result, $data ) {
155
+ if (
156
+ !is_wp_error($result)
157
+ &&
158
+ isset( $data['plugin'] )
159
+ &&
160
+ plugin_basename( __FILE__ ) === $data['plugin']
161
+ ) {
162
+ /**
163
+ * After plugin successfully updated
164
+ */
165
+ do_action( 'fw_plugin_post_update' );
166
+ }
167
+
168
+ return $result;
169
+ }
170
+
171
+ public static function _action_fw_automatic_updates_complete($results) {
172
+ if (!isset($results['plugin'])) {
173
+ return;
174
+ }
175
+
176
+ foreach ($results['plugin'] as $plugin) {
177
+ if (plugin_basename( __FILE__ ) === strtolower($plugin->item->plugin)) {
178
+ do_action( 'fw_automatic_update_complete', $plugin->result );
179
+ break;
180
+ }
181
+ }
182
+ }
183
+ }
184
+ _FW_Update_Hooks::_init();
185
  }
186
  }