Version Description
- Fixed #889 Some scripts/styles were enqueued too early
- Minor fixes and improvements (diff)
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.4.9 |
Comparing to | |
See all releases |
Code changes from version 2.4.8 to 2.4.9
- framework/core/components/backend.php +71 -12
- framework/core/extends/class-fw-container-type.php +13 -0
- framework/core/extends/class-fw-option-type.php +13 -0
- framework/includes/option-types/addable-box/static/js/scripts.js +3 -3
- framework/includes/option-types/addable-popup/static/js/addable-popup.js +3 -3
- framework/includes/option-types/color-picker/static/css/styles.css +4 -2
- framework/includes/option-types/color-picker/static/js/scripts.js +1 -1
- framework/includes/option-types/rgba-color-picker/static/css/styles.css +4 -2
- framework/includes/option-types/rgba-color-picker/static/js/scripts.js +1 -1
- framework/manifest.php +1 -1
- framework/static/js/fw.js +5 -0
- framework/views/backend-settings-form.php +2 -0
- readme.txt +5 -1
- unyson.php +1 -1
framework/core/components/backend.php
CHANGED
@@ -157,7 +157,22 @@ final class _FW_Component_Backend {
|
|
157 |
add_action('admin_menu', array($this, '_action_admin_menu'));
|
158 |
add_action('add_meta_boxes', array($this, '_action_create_post_meta_boxes'), 10, 2);
|
159 |
add_action('init', array($this, '_action_init'), 20);
|
160 |
-
add_action('admin_enqueue_scripts', array($this, '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
// render and submit options from javascript
|
163 |
{
|
@@ -253,6 +268,19 @@ final class _FW_Component_Backend {
|
|
253 |
}
|
254 |
|
255 |
private function register_static() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
if ( $this->static_registered ) {
|
257 |
return;
|
258 |
}
|
@@ -453,7 +481,7 @@ final class _FW_Component_Backend {
|
|
453 |
return;
|
454 |
}
|
455 |
|
456 |
-
if ( ! fw()->theme->
|
457 |
return;
|
458 |
}
|
459 |
|
@@ -1008,6 +1036,10 @@ final class _FW_Component_Backend {
|
|
1008 |
do_action( 'fw_save_term_options', $term_id, $taxonomy, $old_values );
|
1009 |
}
|
1010 |
|
|
|
|
|
|
|
|
|
1011 |
public function _action_admin_enqueue_scripts() {
|
1012 |
global $current_screen, $plugin_page, $post;
|
1013 |
|
@@ -1055,8 +1087,6 @@ final class _FW_Component_Backend {
|
|
1055 |
do_action( 'fw_admin_enqueue_scripts:term', $current_screen->taxonomy );
|
1056 |
}
|
1057 |
}
|
1058 |
-
|
1059 |
-
$this->register_static();
|
1060 |
}
|
1061 |
|
1062 |
/**
|
@@ -1324,7 +1354,17 @@ final class _FW_Component_Backend {
|
|
1324 |
$design = $this->default_render_design;
|
1325 |
}
|
1326 |
|
1327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1328 |
/**
|
1329 |
* register scripts and styles
|
1330 |
* in case if this method is called before enqueue_scripts action
|
@@ -1430,7 +1470,18 @@ final class _FW_Component_Backend {
|
|
1430 |
* @param array $options
|
1431 |
*/
|
1432 |
public function enqueue_options_static( $options ) {
|
1433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1434 |
/**
|
1435 |
* register scripts and styles
|
1436 |
* in case if this method is called before enqueue_scripts action
|
@@ -1476,12 +1527,20 @@ final class _FW_Component_Backend {
|
|
1476 |
$design = $this->default_render_design;
|
1477 |
}
|
1478 |
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1485 |
|
1486 |
if ( ! in_array( $design, $this->available_render_designs ) ) {
|
1487 |
trigger_error( 'Invalid render design specified: ' . $design, E_USER_WARNING );
|
157 |
add_action('admin_menu', array($this, '_action_admin_menu'));
|
158 |
add_action('add_meta_boxes', array($this, '_action_create_post_meta_boxes'), 10, 2);
|
159 |
add_action('init', array($this, '_action_init'), 20);
|
160 |
+
add_action('admin_enqueue_scripts', array($this, '_action_admin_register_scripts'),
|
161 |
+
/**
|
162 |
+
* Usually when someone register/enqueue a script/style to be used in other places
|
163 |
+
* in 'admin_enqueue_scripts' actions with default (not set) priority 10, they use priority 9.
|
164 |
+
* Use here priority 8, in case those scripts/styles used in actions with priority 9
|
165 |
+
* are using scripts/styles registered here
|
166 |
+
*/
|
167 |
+
8
|
168 |
+
);
|
169 |
+
add_action('admin_enqueue_scripts', array($this, '_action_admin_enqueue_scripts'),
|
170 |
+
/**
|
171 |
+
* In case some custom defined option types are using script/styles registered
|
172 |
+
* in actions with default priority 10 (make sure the enqueue is executed after register)
|
173 |
+
*/
|
174 |
+
11
|
175 |
+
);
|
176 |
|
177 |
// render and submit options from javascript
|
178 |
{
|
268 |
}
|
269 |
|
270 |
private function register_static() {
|
271 |
+
if (
|
272 |
+
!doing_action('admin_enqueue_scripts')
|
273 |
+
&&
|
274 |
+
!did_action('admin_enqueue_scripts')
|
275 |
+
) {
|
276 |
+
/**
|
277 |
+
* Do not wp_enqueue/register_...() because at this point not all handles has been registered
|
278 |
+
* and maybe they are used in dependencies in handles that are going to be enqueued.
|
279 |
+
* So as a result some handles will not be equeued because of not registered dependecies.
|
280 |
+
*/
|
281 |
+
return;
|
282 |
+
}
|
283 |
+
|
284 |
if ( $this->static_registered ) {
|
285 |
return;
|
286 |
}
|
481 |
return;
|
482 |
}
|
483 |
|
484 |
+
if ( ! fw()->theme->locate_path('/options/settings.php') ) {
|
485 |
return;
|
486 |
}
|
487 |
|
1036 |
do_action( 'fw_save_term_options', $term_id, $taxonomy, $old_values );
|
1037 |
}
|
1038 |
|
1039 |
+
public function _action_admin_register_scripts() {
|
1040 |
+
$this->register_static();
|
1041 |
+
}
|
1042 |
+
|
1043 |
public function _action_admin_enqueue_scripts() {
|
1044 |
global $current_screen, $plugin_page, $post;
|
1045 |
|
1087 |
do_action( 'fw_admin_enqueue_scripts:term', $current_screen->taxonomy );
|
1088 |
}
|
1089 |
}
|
|
|
|
|
1090 |
}
|
1091 |
|
1092 |
/**
|
1354 |
$design = $this->default_render_design;
|
1355 |
}
|
1356 |
|
1357 |
+
if (
|
1358 |
+
!doing_action('admin_enqueue_scripts')
|
1359 |
+
&&
|
1360 |
+
!did_action('admin_enqueue_scripts')
|
1361 |
+
) {
|
1362 |
+
/**
|
1363 |
+
* Do not wp_enqueue/register_...() because at this point not all handles has been registered
|
1364 |
+
* and maybe they are used in dependencies in handles that are going to be enqueued.
|
1365 |
+
* So as a result some handles will not be equeued because of not registered dependecies.
|
1366 |
+
*/
|
1367 |
+
} else {
|
1368 |
/**
|
1369 |
* register scripts and styles
|
1370 |
* in case if this method is called before enqueue_scripts action
|
1470 |
* @param array $options
|
1471 |
*/
|
1472 |
public function enqueue_options_static( $options ) {
|
1473 |
+
if (
|
1474 |
+
!doing_action('admin_enqueue_scripts')
|
1475 |
+
&&
|
1476 |
+
!did_action('admin_enqueue_scripts')
|
1477 |
+
) {
|
1478 |
+
/**
|
1479 |
+
* Do not wp_enqueue/register_...() because at this point not all handles has been registered
|
1480 |
+
* and maybe they are used in dependencies in handles that are going to be enqueued.
|
1481 |
+
* So as a result some handles will not be equeued because of not registered dependecies.
|
1482 |
+
*/
|
1483 |
+
return;
|
1484 |
+
} else {
|
1485 |
/**
|
1486 |
* register scripts and styles
|
1487 |
* in case if this method is called before enqueue_scripts action
|
1527 |
$design = $this->default_render_design;
|
1528 |
}
|
1529 |
|
1530 |
+
if (
|
1531 |
+
!doing_action('admin_enqueue_scripts')
|
1532 |
+
&&
|
1533 |
+
!did_action('admin_enqueue_scripts')
|
1534 |
+
) {
|
1535 |
+
/**
|
1536 |
+
* Do not wp_enqueue/register_...() because at this point not all handles has been registered
|
1537 |
+
* and maybe they are used in dependencies in handles that are going to be enqueued.
|
1538 |
+
* So as a result some handles will not be equeued because of not registered dependecies.
|
1539 |
+
*/
|
1540 |
+
} else {
|
1541 |
+
$this->register_static();
|
1542 |
+
}
|
1543 |
+
|
1544 |
|
1545 |
if ( ! in_array( $design, $this->available_render_designs ) ) {
|
1546 |
trigger_error( 'Invalid render design specified: ' . $design, E_USER_WARNING );
|
framework/core/extends/class-fw-container-type.php
CHANGED
@@ -174,6 +174,19 @@ abstract class FW_Container_Type
|
|
174 |
*/
|
175 |
final public function enqueue_static($id = '', $option = array(), $values = array(), $data = array())
|
176 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
if ($this->static_enqueued) {
|
178 |
return false;
|
179 |
}
|
174 |
*/
|
175 |
final public function enqueue_static($id = '', $option = array(), $values = array(), $data = array())
|
176 |
{
|
177 |
+
if (
|
178 |
+
!doing_action('admin_enqueue_scripts')
|
179 |
+
&&
|
180 |
+
!did_action('admin_enqueue_scripts')
|
181 |
+
) {
|
182 |
+
/**
|
183 |
+
* Do not wp_enqueue/register_...() because at this point not all handles has been registered
|
184 |
+
* and maybe they are used in dependencies in handles that are going to be enqueued.
|
185 |
+
* So as a result some handles will not be equeued because of not registered dependecies.
|
186 |
+
*/
|
187 |
+
return;
|
188 |
+
}
|
189 |
+
|
190 |
if ($this->static_enqueued) {
|
191 |
return false;
|
192 |
}
|
framework/core/extends/class-fw-option-type.php
CHANGED
@@ -192,6 +192,19 @@ abstract class FW_Option_Type
|
|
192 |
*/
|
193 |
final public function enqueue_static($id = '', $option = array(), $data = array())
|
194 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
{
|
196 |
static $option_types_static_enqueued = false;
|
197 |
|
192 |
*/
|
193 |
final public function enqueue_static($id = '', $option = array(), $data = array())
|
194 |
{
|
195 |
+
if (
|
196 |
+
!doing_action('admin_enqueue_scripts')
|
197 |
+
&&
|
198 |
+
!did_action('admin_enqueue_scripts')
|
199 |
+
) {
|
200 |
+
/**
|
201 |
+
* Do not wp_enqueue/register_...() because at this point not all handles has been registered
|
202 |
+
* and maybe they are used in dependencies in handles that are going to be enqueued.
|
203 |
+
* So as a result some handles will not be equeued because of not registered dependecies.
|
204 |
+
*/
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
|
208 |
{
|
209 |
static $option_types_static_enqueued = false;
|
210 |
|
framework/includes/option-types/addable-box/static/js/scripts.js
CHANGED
@@ -116,9 +116,9 @@ jQuery(document).ready(function ($) {
|
|
116 |
$.trim(template),
|
117 |
vars,
|
118 |
{
|
119 |
-
evaluate: /\{\{(
|
120 |
-
interpolate: /\{\{=(
|
121 |
-
escape: /\{\{-(
|
122 |
}
|
123 |
);
|
124 |
} catch (e) {
|
116 |
$.trim(template),
|
117 |
vars,
|
118 |
{
|
119 |
+
evaluate: /\{\{([\s\S]+?)\}\}/g,
|
120 |
+
interpolate: /\{\{=([\s\S]+?)\}\}/g,
|
121 |
+
escape: /\{\{-([\s\S]+?)\}\}/g
|
122 |
}
|
123 |
);
|
124 |
} catch (e) {
|
framework/includes/option-types/addable-popup/static/js/addable-popup.js
CHANGED
@@ -102,9 +102,9 @@
|
|
102 |
$.trim(data.template),
|
103 |
values,
|
104 |
{
|
105 |
-
evaluate: /\{\{(
|
106 |
-
interpolate: /\{\{=(
|
107 |
-
escape: /\{\{-(
|
108 |
}
|
109 |
);
|
110 |
} catch (e) {
|
102 |
$.trim(data.template),
|
103 |
values,
|
104 |
{
|
105 |
+
evaluate: /\{\{([\s\S]+?)\}\}/g,
|
106 |
+
interpolate: /\{\{=([\s\S]+?)\}\}/g,
|
107 |
+
escape: /\{\{-([\s\S]+?)\}\}/g
|
108 |
}
|
109 |
);
|
110 |
} catch (e) {
|
framework/includes/option-types/color-picker/static/css/styles.css
CHANGED
@@ -30,8 +30,10 @@ input.fw-option-type-color-picker.iris-error {
|
|
30 |
cursor: pointer;
|
31 |
}
|
32 |
|
33 |
-
.fw-option-type-color-picker-iris .fw-option-type-color-picker-reset-default
|
34 |
-
|
|
|
|
|
35 |
}
|
36 |
|
37 |
|
30 |
cursor: pointer;
|
31 |
}
|
32 |
|
33 |
+
.fw-option-type-color-picker-iris .fw-option-type-color-picker-reset-default span {
|
34 |
+
line-height: 16px;
|
35 |
+
padding-left: 2px;
|
36 |
+
float: left;
|
37 |
}
|
38 |
|
39 |
|
framework/includes/option-types/color-picker/static/js/scripts.js
CHANGED
@@ -147,12 +147,12 @@ jQuery(document).ready(function($){
|
|
147 |
if (data.color && helpers.isColorValid(data.color)) {
|
148 |
$picker.find('> .iris-picker-inner').append(''
|
149 |
+ '<div class="' + helpers.optionClass + '-reset-default fw-pull-left">'
|
150 |
-
+ /**/'<span>' + data.text + '</span>'
|
151 |
+ /**/'<a class="iris-palette" style="'
|
152 |
+ /**//**/'background-color:'+ data.color +';'
|
153 |
+ /**//**/'height:' + $firstPalette.css('height') + ';'
|
154 |
+ /**//**/'width:' + $firstPalette.css('width') + ';'
|
155 |
+ /**//**/'"></a>'
|
|
|
156 |
+ '</div>'
|
157 |
);
|
158 |
|
147 |
if (data.color && helpers.isColorValid(data.color)) {
|
148 |
$picker.find('> .iris-picker-inner').append(''
|
149 |
+ '<div class="' + helpers.optionClass + '-reset-default fw-pull-left">'
|
|
|
150 |
+ /**/'<a class="iris-palette" style="'
|
151 |
+ /**//**/'background-color:'+ data.color +';'
|
152 |
+ /**//**/'height:' + $firstPalette.css('height') + ';'
|
153 |
+ /**//**/'width:' + $firstPalette.css('width') + ';'
|
154 |
+ /**//**/'"></a>'
|
155 |
+
+ /**/'<span>' + data.text + '</span>'
|
156 |
+ '</div>'
|
157 |
);
|
158 |
|
framework/includes/option-types/rgba-color-picker/static/css/styles.css
CHANGED
@@ -70,8 +70,10 @@ input.fw-option-type-rgba-color-picker.iris-error {
|
|
70 |
cursor: pointer;
|
71 |
}
|
72 |
|
73 |
-
.fw-option-type-rgba-color-picker-iris .fw-option-type-rgba-color-picker-reset-default
|
74 |
-
|
|
|
|
|
75 |
}
|
76 |
|
77 |
|
70 |
cursor: pointer;
|
71 |
}
|
72 |
|
73 |
+
.fw-option-type-rgba-color-picker-iris .fw-option-type-rgba-color-picker-reset-default span {
|
74 |
+
line-height: 16px;
|
75 |
+
padding-left: 2px;
|
76 |
+
float: left;
|
77 |
}
|
78 |
|
79 |
|
framework/includes/option-types/rgba-color-picker/static/js/scripts.js
CHANGED
@@ -240,12 +240,12 @@ jQuery(function($){
|
|
240 |
if (data.color && helpers.isColorValid(data.color)) {
|
241 |
$picker.find('> .iris-picker-inner').append(''
|
242 |
+ '<div class="' + helpers.optionClass + '-reset-default fw-pull-left">'
|
243 |
-
+ /**/'<span>' + data.text + '</span>'
|
244 |
+ /**/'<a class="iris-palette" style="'
|
245 |
+ /**//**/'background-color:'+ data.color +';'
|
246 |
+ /**//**/'height:' + $firstPalette.css('height') + ';'
|
247 |
+ /**//**/'width:' + $firstPalette.css('width') + ';'
|
248 |
+ /**//**/'"></a>'
|
|
|
249 |
+ '</div>'
|
250 |
);
|
251 |
|
240 |
if (data.color && helpers.isColorValid(data.color)) {
|
241 |
$picker.find('> .iris-picker-inner').append(''
|
242 |
+ '<div class="' + helpers.optionClass + '-reset-default fw-pull-left">'
|
|
|
243 |
+ /**/'<a class="iris-palette" style="'
|
244 |
+ /**//**/'background-color:'+ data.color +';'
|
245 |
+ /**//**/'height:' + $firstPalette.css('height') + ';'
|
246 |
+ /**//**/'width:' + $firstPalette.css('width') + ';'
|
247 |
+ /**//**/'"></a>'
|
248 |
+
+ /**/'<span>' + data.text + '</span>'
|
249 |
+ '</div>'
|
250 |
);
|
251 |
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.4.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.4.9';
|
framework/static/js/fw.js
CHANGED
@@ -828,6 +828,11 @@ fw.getQueryString = function(name) {
|
|
828 |
controller: this.frame,
|
829 |
model: this
|
830 |
});
|
|
|
|
|
|
|
|
|
|
|
831 |
},
|
832 |
initialize: function() {
|
833 |
this.initializeFrame();
|
828 |
controller: this.frame,
|
829 |
model: this
|
830 |
});
|
831 |
+
|
832 |
+
/**
|
833 |
+
* This allows to access from DOM the modal instance
|
834 |
+
*/
|
835 |
+
jQuery.data(this.content.el, 'modal', this);
|
836 |
},
|
837 |
initialize: function() {
|
838 |
this.initializeFrame();
|
framework/views/backend-settings-form.php
CHANGED
@@ -394,3 +394,5 @@ jQuery(function($){
|
|
394 |
});
|
395 |
</script>
|
396 |
<?php endif; ?>
|
|
|
|
394 |
});
|
395 |
</script>
|
396 |
<?php endif; ?>
|
397 |
+
|
398 |
+
<?php do_action('fw_settings_form_footer'); ?>
|
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.3
|
6 |
-
Stable tag: 2.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -82,6 +82,10 @@ Yes; Unyson will work with any theme.
|
|
82 |
|
83 |
== Changelog ==
|
84 |
|
|
|
|
|
|
|
|
|
85 |
= 2.4.8 =
|
86 |
* Option type `color-picker` and `rgba-color-picker`: Added "Reset" button [#831](https://github.com/ThemeFuse/Unyson/issues/831)
|
87 |
* Fixed [#853](https://github.com/ThemeFuse/Unyson/issues/853), [#856](https://github.com/ThemeFuse/Unyson/issues/856), [#794](https://github.com/ThemeFuse/Unyson/issues/794), [#865](https://github.com/ThemeFuse/Unyson/issues/865), [#873](https://github.com/ThemeFuse/Unyson/issues/873), [#876](https://github.com/ThemeFuse/Unyson/issues/876)
|
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.3
|
6 |
+
Stable tag: 2.4.9
|
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.9 =
|
86 |
+
* Fixed [#889](https://github.com/ThemeFuse/Unyson/issues/889) Some scripts/styles were enqueued too early
|
87 |
+
* Minor fixes and improvements ([diff](https://github.com/ThemeFuse/Unyson/compare/v2.4.8...v2.4.9))
|
88 |
+
|
89 |
= 2.4.8 =
|
90 |
* Option type `color-picker` and `rgba-color-picker`: Added "Reset" button [#831](https://github.com/ThemeFuse/Unyson/issues/831)
|
91 |
* Fixed [#853](https://github.com/ThemeFuse/Unyson/issues/853), [#856](https://github.com/ThemeFuse/Unyson/issues/856), [#794](https://github.com/ThemeFuse/Unyson/issues/794), [#865](https://github.com/ThemeFuse/Unyson/issues/865), [#873](https://github.com/ThemeFuse/Unyson/issues/873), [#876](https://github.com/ThemeFuse/Unyson/issues/876)
|
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.
|
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.4.9
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|