Version Description
- Minor fixes
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.5.6 |
Comparing to | |
See all releases |
Code changes from version 2.5.5 to 2.5.6
- framework/core/components/backend.php +1 -1
- framework/includes/option-types/addable-box/static/js/scripts.js +5 -2
- framework/includes/option-types/addable-popup/static/css/styles.css +2 -1
- framework/includes/option-types/popup/class-fw-option-type-popup.php +9 -2
- framework/includes/option-types/popup/static/js/popup.js +21 -0
- framework/includes/option-types/wp-editor/class-fw-option-type-wp-editor.php +4 -1
- framework/includes/option-types/wp-editor/static/scripts.js +39 -9
- framework/includes/term-meta/function_fw_term_meta_setup_blog.php +1 -1
- framework/manifest.php +1 -1
- framework/static/css/backend-options.css +1 -1
- framework/static/js/backend-options.js +7 -0
- framework/static/js/fw.js +11 -0
- framework/views/backend-option-design-default.php +16 -2
- readme.txt +4 -1
- unyson.php +1 -1
framework/core/components/backend.php
CHANGED
@@ -345,7 +345,7 @@ final class _FW_Component_Backend {
|
|
345 |
fw_get_framework_directory_uri( '/static/js/fw.js' ),
|
346 |
array( 'jquery', 'fw-events', 'backbone', 'qtip' ),
|
347 |
fw()->manifest->get_version(),
|
348 |
-
|
349 |
);
|
350 |
|
351 |
wp_localize_script( 'fw', '_fw_localized', array(
|
345 |
fw_get_framework_directory_uri( '/static/js/fw.js' ),
|
346 |
array( 'jquery', 'fw-events', 'backbone', 'qtip' ),
|
347 |
fw()->manifest->get_version(),
|
348 |
+
false // false fixes https://github.com/ThemeFuse/Unyson/issues/1625#issuecomment-224219454
|
349 |
);
|
350 |
|
351 |
wp_localize_script( 'fw', '_fw_localized', array(
|
framework/includes/option-types/addable-box/static/js/scripts.js
CHANGED
@@ -170,11 +170,14 @@ jQuery(document).ready(function ($) {
|
|
170 |
|
171 |
$box.removeClass(titleUpdater.pendingClass);
|
172 |
|
|
|
|
|
173 |
$box.find('> .hndle span:not([class])').first().html(
|
174 |
-
this.template(data.template,
|
175 |
);
|
176 |
|
177 |
delete data;
|
|
|
178 |
this.update();
|
179 |
return;
|
180 |
}
|
@@ -198,7 +201,7 @@ jQuery(document).ready(function ($) {
|
|
198 |
var template = '';
|
199 |
|
200 |
if (response.success) {
|
201 |
-
template = this.template(data.template, response.data.values);
|
202 |
} else {
|
203 |
template = '[Ajax Error] '+ response.data.message
|
204 |
}
|
170 |
|
171 |
$box.removeClass(titleUpdater.pendingClass);
|
172 |
|
173 |
+
var jsonParsedValues = JSON.parse(values) || {};
|
174 |
+
|
175 |
$box.find('> .hndle span:not([class])').first().html(
|
176 |
+
this.template(data.template, $.extend({}, {o: jsonParsedValues}, jsonParsedValues))
|
177 |
);
|
178 |
|
179 |
delete data;
|
180 |
+
delete jsonParsedValues;
|
181 |
this.update();
|
182 |
return;
|
183 |
}
|
201 |
var template = '';
|
202 |
|
203 |
if (response.success) {
|
204 |
+
template = this.template(data.template, $.extend({}, {o: response.data.values}, response.data.values));
|
205 |
} else {
|
206 |
template = '[Ajax Error] '+ response.data.message
|
207 |
}
|
framework/includes/option-types/addable-popup/static/css/styles.css
CHANGED
@@ -5,8 +5,9 @@
|
|
5 |
cursor: pointer;
|
6 |
}
|
7 |
|
8 |
-
.fw-option-type-addable-popup .item .content{
|
9 |
padding: 12px 30px;
|
|
|
10 |
}
|
11 |
|
12 |
.fw-option-type-addable-popup .item:not(.default) + .item:not(.default){
|
5 |
cursor: pointer;
|
6 |
}
|
7 |
|
8 |
+
.fw-option-type-addable-popup .item .content {
|
9 |
padding: 12px 30px;
|
10 |
+
word-wrap: break-word;
|
11 |
}
|
12 |
|
13 |
.fw-option-type-addable-popup .item:not(.default) + .item:not(.default){
|
framework/includes/option-types/popup/class-fw-option-type-popup.php
CHANGED
@@ -53,7 +53,8 @@ class FW_Option_Type_Popup extends FW_Option_Type {
|
|
53 |
'title' => ( isset( $option['popup-title'] ) ) ? $option['popup-title'] : ( string ) $option['label'],
|
54 |
'options' => $this->transform_options( $option['popup-options'] ),
|
55 |
'button' => $option['button'],
|
56 |
-
'size' => $option['size']
|
|
|
57 |
) );
|
58 |
|
59 |
if ( ! empty( $data['value'] ) ) {
|
@@ -173,7 +174,13 @@ class FW_Option_Type_Popup extends FW_Option_Type {
|
|
173 |
/*
|
174 |
* Array of default values for the popup options
|
175 |
*/
|
176 |
-
'value' => array()
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
);
|
178 |
}
|
179 |
|
53 |
'title' => ( isset( $option['popup-title'] ) ) ? $option['popup-title'] : ( string ) $option['label'],
|
54 |
'options' => $this->transform_options( $option['popup-options'] ),
|
55 |
'button' => $option['button'],
|
56 |
+
'size' => $option['size'],
|
57 |
+
'custom-events' => $option['custom-events']
|
58 |
) );
|
59 |
|
60 |
if ( ! empty( $data['value'] ) ) {
|
174 |
/*
|
175 |
* Array of default values for the popup options
|
176 |
*/
|
177 |
+
'value' => array(),
|
178 |
+
|
179 |
+
'custom-events' => array(
|
180 |
+
'open' => false,
|
181 |
+
'close' => false,
|
182 |
+
'render' => false
|
183 |
+
)
|
184 |
);
|
185 |
}
|
186 |
|
framework/includes/option-types/popup/static/js/popup.js
CHANGED
@@ -58,12 +58,33 @@
|
|
58 |
},
|
59 |
'open': function () {
|
60 |
$this.trigger('fw:option-type:popup:open');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
},
|
62 |
'close': function () {
|
63 |
$this.trigger('fw:option-type:popup:close');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
},
|
65 |
'render': function () {
|
66 |
$this.trigger('fw:option-type:popup:render');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
});
|
69 |
};
|
58 |
},
|
59 |
'open': function () {
|
60 |
$this.trigger('fw:option-type:popup:open');
|
61 |
+
|
62 |
+
if (data['custom-events']['open']) {
|
63 |
+
fwEvents.trigger('fw:option-type:popup:custom:' + data['custom-events']['open'], {
|
64 |
+
element: $this,
|
65 |
+
modal: utils.modal
|
66 |
+
});
|
67 |
+
}
|
68 |
},
|
69 |
'close': function () {
|
70 |
$this.trigger('fw:option-type:popup:close');
|
71 |
+
|
72 |
+
if (data['custom-events']['close']) {
|
73 |
+
fwEvents.trigger('fw:option-type:popup:custom:' + data['custom-events']['close'], {
|
74 |
+
element: $this,
|
75 |
+
modal: utils.modal
|
76 |
+
});
|
77 |
+
}
|
78 |
},
|
79 |
'render': function () {
|
80 |
$this.trigger('fw:option-type:popup:render');
|
81 |
+
|
82 |
+
if (data['custom-events']['render']) {
|
83 |
+
fwEvents.trigger('fw:option-type:popup:custom:' + data['custom-events']['render'], {
|
84 |
+
element: $this,
|
85 |
+
modal: utils.modal
|
86 |
+
});
|
87 |
+
}
|
88 |
}
|
89 |
});
|
90 |
};
|
framework/includes/option-types/wp-editor/class-fw-option-type-wp-editor.php
CHANGED
@@ -21,12 +21,13 @@ class FW_Option_Type_Wp_Editor extends FW_Option_Type {
|
|
21 |
'value' => '',
|
22 |
'size' => 'small', // small, large
|
23 |
'editor_height' => 400,
|
|
|
|
|
24 |
|
25 |
/**
|
26 |
* Also available
|
27 |
* https://github.com/WordPress/WordPress/blob/4.4.2/wp-includes/class-wp-editor.php#L80-L94
|
28 |
*/
|
29 |
-
'wpautop' => true,
|
30 |
);
|
31 |
}
|
32 |
|
@@ -55,6 +56,8 @@ class FW_Option_Type_Wp_Editor extends FW_Option_Type {
|
|
55 |
unset( $option['attr']['name'], $option['attr']['value'] );
|
56 |
|
57 |
$option['attr']['data-size'] = $option['size'];
|
|
|
|
|
58 |
}
|
59 |
|
60 |
echo '<div '. fw_attr_to_html($option['attr']) .' >';
|
21 |
'value' => '',
|
22 |
'size' => 'small', // small, large
|
23 |
'editor_height' => 400,
|
24 |
+
'wpautop' => true,
|
25 |
+
'editor_type' => false, // tinymce, html
|
26 |
|
27 |
/**
|
28 |
* Also available
|
29 |
* https://github.com/WordPress/WordPress/blob/4.4.2/wp-includes/class-wp-editor.php#L80-L94
|
30 |
*/
|
|
|
31 |
);
|
32 |
}
|
33 |
|
56 |
unset( $option['attr']['name'], $option['attr']['value'] );
|
57 |
|
58 |
$option['attr']['data-size'] = $option['size'];
|
59 |
+
$option['attr']['data-mode'] = in_array($option['editor_type'], array('html', 'tinymce'))
|
60 |
+
? $option['editor_type'] : false;
|
61 |
}
|
62 |
|
63 |
echo '<div '. fw_attr_to_html($option['attr']) .' >';
|
framework/includes/option-types/wp-editor/static/scripts.js
CHANGED
@@ -27,30 +27,60 @@
|
|
27 |
tinyMCEPreInit.mceInit[ id ].setup = function(ed) {
|
28 |
ed.once('init', function (e) {
|
29 |
var editor = e.target,
|
30 |
-
id = editor.id
|
|
|
|
|
|
|
|
|
31 |
|
32 |
editor.on('change', function(){ editor.save(); });
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* Quick Tags
|
36 |
* http://stackoverflow.com/a/21519323/1794248
|
37 |
*/
|
38 |
{
|
39 |
-
|
40 |
-
$( '[id="wp-' + id + '-wrap"]' ).bind( 'onmousedown', function(){
|
41 |
-
wpActiveEditor = id;
|
42 |
-
});
|
43 |
|
44 |
-
QTags( tinyMCEPreInit.qtInit[ id ] );
|
45 |
QTags._buttonsInit();
|
46 |
|
47 |
-
(
|
48 |
-
$wrap.find('.switch-
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
});
|
52 |
};
|
53 |
|
|
|
|
|
|
|
|
|
54 |
try {
|
55 |
tinymce.init( tinyMCEPreInit.mceInit[ id ] );
|
56 |
} catch(e){
|
27 |
tinyMCEPreInit.mceInit[ id ].setup = function(ed) {
|
28 |
ed.once('init', function (e) {
|
29 |
var editor = e.target,
|
30 |
+
id = editor.id,
|
31 |
+
$wrap = $textarea.closest('.wp-editor-wrap'),
|
32 |
+
visualMode = (typeof $option.attr('data-mode') != 'undefined')
|
33 |
+
? ($option.attr('data-mode') == 'tinymce')
|
34 |
+
: $wrap.hasClass('tmce-active');
|
35 |
|
36 |
editor.on('change', function(){ editor.save(); });
|
37 |
|
38 |
+
/**
|
39 |
+
* Fixes when wpautop is false
|
40 |
+
*/
|
41 |
+
if (!editor.getParam('wpautop')) {
|
42 |
+
editor
|
43 |
+
.on('SaveContent', function(event){
|
44 |
+
// Remove <p> in Visual mode
|
45 |
+
if (event.content && $wrap.hasClass('tmce-active')) {
|
46 |
+
event.content = wp.editor.removep(event.content);
|
47 |
+
}
|
48 |
+
})
|
49 |
+
.on('BeforeSetContent', function(event){
|
50 |
+
// Prevent inline all content when switching from Text to Visual mode
|
51 |
+
if (event.content && !$wrap.hasClass('tmce-active')) {
|
52 |
+
event.content = wp.editor.autop(event.content);
|
53 |
+
}
|
54 |
+
});
|
55 |
+
}
|
56 |
+
|
57 |
/**
|
58 |
* Quick Tags
|
59 |
* http://stackoverflow.com/a/21519323/1794248
|
60 |
*/
|
61 |
{
|
62 |
+
new QTags( tinyMCEPreInit.qtInit[ id ] );
|
|
|
|
|
|
|
63 |
|
|
|
64 |
QTags._buttonsInit();
|
65 |
|
66 |
+
if ($wrap.hasClass('html-active')) {
|
67 |
+
$wrap.find('.switch-html').trigger('click');
|
68 |
+
}
|
69 |
+
|
70 |
+
$wrap.find('.switch-'+ (visualMode ? 'tmce' : 'html')).trigger('click');
|
71 |
+
|
72 |
+
|
73 |
+
if (!editor.getParam('wpautop') && !visualMode) {
|
74 |
+
$textarea.val(wp.editor.removep(editor.getContent()));
|
75 |
+
}
|
76 |
}
|
77 |
});
|
78 |
};
|
79 |
|
80 |
+
if (!tinyMCEPreInit.mceInit[ id ].wpautop) {
|
81 |
+
$textarea.val( wp.editor.autop($textarea.val()) );
|
82 |
+
}
|
83 |
+
|
84 |
try {
|
85 |
tinymce.init( tinyMCEPreInit.mceInit[ id ] );
|
86 |
} catch(e){
|
framework/includes/term-meta/function_fw_term_meta_setup_blog.php
CHANGED
@@ -29,7 +29,7 @@ if (!function_exists('_fw_term_meta_setup_blog')):
|
|
29 |
meta_value longtext,
|
30 |
PRIMARY KEY (meta_id),
|
31 |
KEY fw_term_id (fw_term_id),
|
32 |
-
KEY meta_key (meta_key)
|
33 |
) $charset_collate;"
|
34 |
);
|
35 |
}
|
29 |
meta_value longtext,
|
30 |
PRIMARY KEY (meta_id),
|
31 |
KEY fw_term_id (fw_term_id),
|
32 |
+
KEY `meta_key` (`meta_key`(191))
|
33 |
) $charset_collate;"
|
34 |
);
|
35 |
}
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.5.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.5.6';
|
framework/static/css/backend-options.css
CHANGED
@@ -79,7 +79,7 @@ body.rtl .fw-options-tabs-wrapper > .fw-options-tabs-list ul li {
|
|
79 |
|
80 |
.fw-options-tabs-wrapper > .fw-options-tabs-list ul li a.nav-tab {
|
81 |
padding: 6px 12px;
|
82 |
-
font-weight:
|
83 |
font-size: 15px;
|
84 |
line-height: 24px;
|
85 |
text-decoration: none;
|
79 |
|
80 |
.fw-options-tabs-wrapper > .fw-options-tabs-list ul li a.nav-tab {
|
81 |
padding: 6px 12px;
|
82 |
+
font-weight: 600;
|
83 |
font-size: 15px;
|
84 |
line-height: 24px;
|
85 |
text-decoration: none;
|
framework/static/js/backend-options.js
CHANGED
@@ -95,6 +95,13 @@ jQuery(document).ready(function($){
|
|
95 |
initAllTabs = function ($el) {
|
96 |
var selector = '.fw-options-tab[' + htmlAttrName + ']', $tabs;
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
// initialized tabs can contain tabs, so init recursive until nothing is found
|
99 |
while (($tabs = $el.find(selector)).length) {
|
100 |
$tabs.each(function(){ initTab($(this)); });
|
95 |
initAllTabs = function ($el) {
|
96 |
var selector = '.fw-options-tab[' + htmlAttrName + ']', $tabs;
|
97 |
|
98 |
+
// fixes https://github.com/ThemeFuse/Unyson/issues/1634
|
99 |
+
$el.each(function(){
|
100 |
+
if ($(this).is(selector)) {
|
101 |
+
initTab($(this));
|
102 |
+
}
|
103 |
+
});
|
104 |
+
|
105 |
// initialized tabs can contain tabs, so init recursive until nothing is found
|
106 |
while (($tabs = $el.find(selector)).length) {
|
107 |
$tabs.each(function(){ initTab($(this)); });
|
framework/static/js/fw.js
CHANGED
@@ -624,6 +624,7 @@ fw.getQueryString = function(name) {
|
|
624 |
*/
|
625 |
html: '',
|
626 |
modalCustomClass: '',
|
|
|
627 |
size: 'small' // small, medium, large
|
628 |
},
|
629 |
ContentView: Backbone.View.extend({
|
@@ -669,6 +670,16 @@ fw.getQueryString = function(name) {
|
|
669 |
}
|
670 |
|
671 |
this.$el.append('<input type="submit" class="fw-hidden hidden-submit" />');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
672 |
}
|
673 |
}),
|
674 |
/**
|
624 |
*/
|
625 |
html: '',
|
626 |
modalCustomClass: '',
|
627 |
+
disableLazyTabs: false,
|
628 |
size: 'small' // small, medium, large
|
629 |
},
|
630 |
ContentView: Backbone.View.extend({
|
670 |
}
|
671 |
|
672 |
this.$el.append('<input type="submit" class="fw-hidden hidden-submit" />');
|
673 |
+
|
674 |
+
/**
|
675 |
+
* The user may want to completely disable lazy tabs for the
|
676 |
+
* current modal. It is VERY convenient sometimes.
|
677 |
+
*/
|
678 |
+
if (this.model.get('disableLazyTabs')) {
|
679 |
+
fwEvents.trigger('fw:options:init:tabs', {
|
680 |
+
$elements: this.model.frame.$el
|
681 |
+
});
|
682 |
+
}
|
683 |
}
|
684 |
}),
|
685 |
/**
|
framework/views/backend-option-design-default.php
CHANGED
@@ -44,6 +44,20 @@
|
|
44 |
}
|
45 |
|
46 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
$classes = array(
|
48 |
'option' => array(
|
49 |
'fw-backend-option',
|
@@ -53,12 +67,12 @@
|
|
53 |
),
|
54 |
'label' => array(
|
55 |
'fw-backend-option-label',
|
56 |
-
'responsive' => '
|
57 |
),
|
58 |
'input' => array(
|
59 |
'fw-backend-option-input',
|
60 |
'fw-backend-option-input-type-'. $option['type'],
|
61 |
-
'responsive' => '
|
62 |
),
|
63 |
'desc' => array(
|
64 |
'fw-backend-option-desc',
|
44 |
}
|
45 |
|
46 |
{
|
47 |
+
try {
|
48 |
+
$responsive_classes = FW_Cache::get(
|
49 |
+
$cache_key = 'fw:backend-option-view:responsive-classes'
|
50 |
+
);
|
51 |
+
} catch (FW_Cache_Not_Found_Exception $e) {
|
52 |
+
FW_Cache::set(
|
53 |
+
$cache_key,
|
54 |
+
$responsive_classes = apply_filters('fw:backend-option-view:design-default:responsive-classes', array(
|
55 |
+
'label' => 'fw-col-xs-12 fw-col-sm-3 fw-col-lg-2',
|
56 |
+
'input' => 'fw-col-xs-12 fw-col-sm-9 fw-col-lg-10',
|
57 |
+
))
|
58 |
+
);
|
59 |
+
}
|
60 |
+
|
61 |
$classes = array(
|
62 |
'option' => array(
|
63 |
'fw-backend-option',
|
67 |
),
|
68 |
'label' => array(
|
69 |
'fw-backend-option-label',
|
70 |
+
'responsive' => $responsive_classes['label'],
|
71 |
),
|
72 |
'input' => array(
|
73 |
'fw-backend-option-input',
|
74 |
'fw-backend-option-input-type-'. $option['type'],
|
75 |
+
'responsive' => $responsive_classes['input'],
|
76 |
),
|
77 |
'desc' => array(
|
78 |
'fw-backend-option-desc',
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson
|
|
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.3
|
5 |
Tested up to: 4.5
|
6 |
-
Stable tag: 2.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -81,6 +81,9 @@ Yes; Unyson will work with any theme.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
84 |
= 2.5.5 =
|
85 |
* Fixed [#1586](https://github.com/ThemeFuse/Unyson/issues/1586)
|
86 |
|
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.3
|
5 |
Tested up to: 4.5
|
6 |
+
Stable tag: 2.5.6
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 2.5.6 =
|
85 |
+
* [Minor fixes](https://github.com/ThemeFuse/Unyson/compare/v2.5.5...v2.5.6#files_bucket)
|
86 |
+
|
87 |
= 2.5.5 =
|
88 |
* Fixed [#1586](https://github.com/ThemeFuse/Unyson/issues/1586)
|
89 |
|
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.5.
|
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.5.6
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|