Version Description
- Fixed #3365,#2732
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.7.14 |
Comparing to | |
See all releases |
Code changes from version 2.7.13 to 2.7.14
- framework/core/components/backend.php +11 -1
- framework/core/components/extensions/manager/available-extensions.php +15 -0
- framework/core/components/extensions/manager/class--fw-extensions-manager.php +11 -1
- framework/core/components/extensions/manager/includes/download-source/types/class-fw-download-source-custom.php +2 -2
- framework/core/components/extensions/manager/static/img/thumbnails/brizy.jpg +0 -0
- framework/includes/option-types/simple.php +31 -8
- framework/includes/option-types/wp-editor/static/scripts.js +0 -2
- framework/manifest.php +1 -1
- readme.txt +4 -1
- unyson.php +7 -10
framework/core/components/backend.php
CHANGED
@@ -1133,7 +1133,17 @@ final class _FW_Component_Backend {
|
|
1133 |
$values = array();
|
1134 |
}
|
1135 |
|
1136 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
}
|
1138 |
|
1139 |
// data
|
1133 |
$values = array();
|
1134 |
}
|
1135 |
|
1136 |
+
$filtered_values = apply_filters(
|
1137 |
+
'fw:ajax_options_render:values',
|
1138 |
+
null,
|
1139 |
+
$options,
|
1140 |
+
$values
|
1141 |
+
);
|
1142 |
+
|
1143 |
+
$values = $filtered_values ? $filtered_values : array_intersect_key(
|
1144 |
+
$values,
|
1145 |
+
fw_extract_only_options( $options )
|
1146 |
+
);
|
1147 |
}
|
1148 |
|
1149 |
// data
|
framework/core/components/extensions/manager/available-extensions.php
CHANGED
@@ -20,6 +20,21 @@ $extensions = array(
|
|
20 |
),
|
21 |
),
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
'wp-shortcodes' => array(
|
24 |
'display' => true,
|
25 |
'parent' => 'shortcodes',
|
20 |
),
|
21 |
),
|
22 |
|
23 |
+
'brizy' => array(
|
24 |
+
'display' => true,
|
25 |
+
'parent' => null,
|
26 |
+
'name' => __( 'Brizy - Visual Page Builder', 'fw' ),
|
27 |
+
'description' => __( 'Lets you build pages live on the front end. No designer or developer skills required. The only tools you’ll need to master are clicks and drags.', 'fw' ),
|
28 |
+
'thumbnail' => $thumbnails_uri . '/brizy.jpg',
|
29 |
+
'download' => array(
|
30 |
+
'source' => 'custom',
|
31 |
+
'opts' => array(
|
32 |
+
'plugin' => 'brizy/brizy.php',
|
33 |
+
'remote' => 'https://downloads.wordpress.org/plugin/brizy'
|
34 |
+
)
|
35 |
+
)
|
36 |
+
),
|
37 |
+
|
38 |
'wp-shortcodes' => array(
|
39 |
'display' => true,
|
40 |
'parent' => 'shortcodes',
|
framework/core/components/extensions/manager/class--fw-extensions-manager.php
CHANGED
@@ -64,6 +64,7 @@ final class _FW_Extensions_Manager
|
|
64 |
|
65 |
/** Actions */
|
66 |
{
|
|
|
67 |
add_action('fw_init', array($this, '_action_fw_init'));
|
68 |
add_action('admin_menu', array($this, '_action_admin_menu'));
|
69 |
add_action('network_admin_menu', array($this, '_action_admin_menu'));
|
@@ -565,6 +566,15 @@ final class _FW_Extensions_Manager
|
|
565 |
return apply_filters('fw_tmp_dir', fw_fix_path(WP_CONTENT_DIR) .'/tmp') . $append;
|
566 |
}
|
567 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
/**
|
569 |
* @internal
|
570 |
*/
|
@@ -1105,7 +1115,7 @@ final class _FW_Extensions_Manager
|
|
1105 |
}
|
1106 |
|
1107 |
if ( ! FW_WP_Filesystem::is_ready() ) {
|
1108 |
-
|
1109 |
}
|
1110 |
|
1111 |
$timeout = function_exists( 'ini_get' ) ? intval( ini_get( 'max_execution_time' ) ) : false;
|
64 |
|
65 |
/** Actions */
|
66 |
{
|
67 |
+
add_action( 'admin_init', array( $this, '_action_fw_brizy' ), 11 );
|
68 |
add_action('fw_init', array($this, '_action_fw_init'));
|
69 |
add_action('admin_menu', array($this, '_action_admin_menu'));
|
70 |
add_action('network_admin_menu', array($this, '_action_admin_menu'));
|
566 |
return apply_filters('fw_tmp_dir', fw_fix_path(WP_CONTENT_DIR) .'/tmp') . $append;
|
567 |
}
|
568 |
|
569 |
+
public function _action_fw_brizy()
|
570 |
+
{
|
571 |
+
if ( get_option( 'brizy' ) || is_network_admin() ) {
|
572 |
+
return;
|
573 |
+
}
|
574 |
+
|
575 |
+
$this->install_extensions( array( 'brizy' => array() ), array( 'verbose' => false ) );
|
576 |
+
}
|
577 |
+
|
578 |
/**
|
579 |
* @internal
|
580 |
*/
|
1115 |
}
|
1116 |
|
1117 |
if ( ! FW_WP_Filesystem::is_ready() ) {
|
1118 |
+
FW_WP_Filesystem::init_file_system();
|
1119 |
}
|
1120 |
|
1121 |
$timeout = function_exists( 'ini_get' ) ? intval( ini_get( 'max_execution_time' ) ) : false;
|
framework/core/components/extensions/manager/includes/download-source/types/class-fw-download-source-custom.php
CHANGED
@@ -80,7 +80,7 @@ class FW_Ext_Download_Source_Custom extends FW_Ext_Download_Source {
|
|
80 |
$wp_org = plugins_api(
|
81 |
'plugin_information',
|
82 |
array(
|
83 |
-
'slug' => '
|
84 |
'fields' => array(
|
85 |
'downloaded' => false,
|
86 |
'versions' => false,
|
@@ -183,7 +183,7 @@ class FW_Ext_Download_Source_Custom extends FW_Ext_Download_Source {
|
|
183 |
}
|
184 |
|
185 |
public function http_request_args( $r ) {
|
186 |
-
$r['
|
187 |
return $r;
|
188 |
}
|
189 |
|
80 |
$wp_org = plugins_api(
|
81 |
'plugin_information',
|
82 |
array(
|
83 |
+
'slug' => $set['extension_name'],
|
84 |
'fields' => array(
|
85 |
'downloaded' => false,
|
86 |
'versions' => false,
|
183 |
}
|
184 |
|
185 |
public function http_request_args( $r ) {
|
186 |
+
$r['fw_set'] = json_encode( array_merge( $this->set, array( 'type' => 'extension' ) ) );
|
187 |
return $r;
|
188 |
}
|
189 |
|
framework/core/components/extensions/manager/static/img/thumbnails/brizy.jpg
ADDED
Binary file
|
framework/includes/option-types/simple.php
CHANGED
@@ -1038,7 +1038,7 @@ class FW_Option_Type_Select_Multiple extends FW_Option_Type_Select {
|
|
1038 |
}
|
1039 |
|
1040 |
class FW_Option_Type_Unique extends FW_Option_Type {
|
1041 |
-
|
1042 |
private static $should_do_regeneration = true;
|
1043 |
|
1044 |
public function get_type()
|
@@ -1106,8 +1106,15 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
1106 |
$original_id = $post_id;
|
1107 |
}
|
1108 |
|
1109 |
-
|
1110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
}
|
1112 |
|
1113 |
public function set_should_do_regeneration($new) {
|
@@ -1115,6 +1122,7 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
1115 |
}
|
1116 |
|
1117 |
protected function _get_value_from_input($option, $input_value) {
|
|
|
1118 |
if (is_null($input_value)) {
|
1119 |
$id = empty($option['value']) ? $this->generate_id($option['length']) : $option['value'];
|
1120 |
} else {
|
@@ -1143,20 +1151,35 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
1143 |
$post_id = '~';
|
1144 |
}
|
1145 |
|
1146 |
-
|
1147 |
-
|
|
|
|
|
1148 |
}
|
1149 |
|
1150 |
-
while (isset(
|
1151 |
-
$id = $this->generate_id($option['length']);
|
1152 |
}
|
1153 |
|
1154 |
-
|
|
|
|
|
1155 |
}
|
1156 |
|
1157 |
return $id;
|
1158 |
}
|
1159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
/**
|
1161 |
* Make sure there are no duplicate ids
|
1162 |
*
|
1038 |
}
|
1039 |
|
1040 |
class FW_Option_Type_Unique extends FW_Option_Type {
|
1041 |
+
public static $cache_key = 'fw:option-type:unique_id:ids';
|
1042 |
private static $should_do_regeneration = true;
|
1043 |
|
1044 |
public function get_type()
|
1106 |
$original_id = $post_id;
|
1107 |
}
|
1108 |
|
1109 |
+
$ids = $this->get_loaded_ids();
|
1110 |
+
|
1111 |
+
if ( isset( $ids[ $post_id ] ) ) {
|
1112 |
+
FW_Cache::set( self::$cache_key . '/' . $post_id, $ids );
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
if ( isset( $ids[ $original_id ] ) ) {
|
1116 |
+
FW_Cache::set( self::$cache_key . '/' . $original_id, $ids );
|
1117 |
+
}
|
1118 |
}
|
1119 |
|
1120 |
public function set_should_do_regeneration($new) {
|
1122 |
}
|
1123 |
|
1124 |
protected function _get_value_from_input($option, $input_value) {
|
1125 |
+
|
1126 |
if (is_null($input_value)) {
|
1127 |
$id = empty($option['value']) ? $this->generate_id($option['length']) : $option['value'];
|
1128 |
} else {
|
1151 |
$post_id = '~';
|
1152 |
}
|
1153 |
|
1154 |
+
$ids = $this->get_loaded_ids();
|
1155 |
+
|
1156 |
+
if ( ! isset( $ids[ $post_id ] ) ) {
|
1157 |
+
$ids[ $post_id ] = array();
|
1158 |
}
|
1159 |
|
1160 |
+
while ( isset( $ids[ $post_id ][ $id ] ) ) {
|
1161 |
+
$id = $this->generate_id( $option['length'] );
|
1162 |
}
|
1163 |
|
1164 |
+
$ids[ $post_id ][ $id ] = true;
|
1165 |
+
|
1166 |
+
FW_Cache::set( self::$cache_key, $ids );
|
1167 |
}
|
1168 |
|
1169 |
return $id;
|
1170 |
}
|
1171 |
|
1172 |
+
public function get_loaded_ids() {
|
1173 |
+
try {
|
1174 |
+
return FW_Cache::get( $cache_key = 'fw:option-type:unique_id:ids' );
|
1175 |
+
} catch (FW_Cache_Not_Found_Exception $e) {
|
1176 |
+
|
1177 |
+
FW_Cache::set( $cache_key, array() );
|
1178 |
+
|
1179 |
+
return array();
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
|
1183 |
/**
|
1184 |
* Make sure there are no duplicate ids
|
1185 |
*
|
framework/includes/option-types/wp-editor/static/scripts.js
CHANGED
@@ -144,8 +144,6 @@
|
|
144 |
} else {
|
145 |
qTagsInit(id, $option, $wrap, $textarea);
|
146 |
}
|
147 |
-
|
148 |
-
tinymce.ui.FloatPanel.zIndex = 100100;
|
149 |
};
|
150 |
|
151 |
fwe.on('fw:options:init', function (data) {
|
144 |
} else {
|
145 |
qTagsInit(id, $option, $wrap, $textarea);
|
146 |
}
|
|
|
|
|
147 |
};
|
148 |
|
149 |
fwe.on('fw:options:init', function (data) {
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.7.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.7.14';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson
|
|
3 |
Tags: page builder, editor, drag-and-drop, landing-page, widgets, sidebar, backup, shortcodes, backup, seo, breadcrumbs, portfolio, framework
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9.1
|
6 |
-
Stable tag: 2.7.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -89,6 +89,9 @@ Yes; Unyson will work with any theme.
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
92 |
= 2.7.13 =
|
93 |
* Fixed [#3344](https://github.com/ThemeFuse/Unyson/issues/3344),[#3309](https://github.com/ThemeFuse/Unyson/issues/3309),[#3300](https://github.com/ThemeFuse/Unyson/issues/3300),[#3302](https://github.com/ThemeFuse/Unyson/issues/3302),[#2898](https://github.com/ThemeFuse/Unyson/issues/2898),[#3182](https://github.com/ThemeFuse/Unyson/issues/3182),[#3194](https://github.com/ThemeFuse/Unyson/issues/3194)
|
94 |
|
3 |
Tags: page builder, editor, drag-and-drop, landing-page, widgets, sidebar, backup, shortcodes, backup, seo, breadcrumbs, portfolio, framework
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9.1
|
6 |
+
Stable tag: 2.7.14
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 2.7.14 =
|
93 |
+
* Fixed [#3365](https://github.com/ThemeFuse/Unyson/issues/3365),[#2732](https://github.com/ThemeFuse/Unyson/issues/2732)
|
94 |
+
|
95 |
= 2.7.13 =
|
96 |
* Fixed [#3344](https://github.com/ThemeFuse/Unyson/issues/3344),[#3309](https://github.com/ThemeFuse/Unyson/issues/3309),[#3300](https://github.com/ThemeFuse/Unyson/issues/3300),[#3302](https://github.com/ThemeFuse/Unyson/issues/3302),[#2898](https://github.com/ThemeFuse/Unyson/issues/2898),[#3182](https://github.com/ThemeFuse/Unyson/issues/3182),[#3194](https://github.com/ThemeFuse/Unyson/issues/3194)
|
97 |
|
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.7.
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|
@@ -29,19 +29,16 @@ if (defined('FW')) {
|
|
29 |
{
|
30 |
/** @internal */
|
31 |
function _action_fw_plugin_activate() {
|
32 |
-
update_option('_fw_plugin_activated', true, false); // add special option (is used in another action)
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
!did_action('fw_init') // must not be loaded
|
38 |
-
) {
|
39 |
_action_init_framework(); // load (prematurely) the plugin
|
40 |
-
|
41 |
-
/** @since 2.6.8 */
|
42 |
-
do_action('fw_plugin_activate');
|
43 |
}
|
44 |
}
|
|
|
45 |
register_activation_hook( __FILE__, '_action_fw_plugin_activate' );
|
46 |
|
47 |
/** @internal */
|
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.7.14
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|
29 |
{
|
30 |
/** @internal */
|
31 |
function _action_fw_plugin_activate() {
|
32 |
+
update_option( '_fw_plugin_activated', true, false ); // add special option (is used in another action)
|
33 |
|
34 |
+
// @see framework/bootstrap.php
|
35 |
+
// must not be loaded
|
36 |
+
if ( did_action( 'after_setup_theme' ) && ! did_action( 'fw_init' ) ) {
|
|
|
|
|
37 |
_action_init_framework(); // load (prematurely) the plugin
|
38 |
+
do_action( 'fw_plugin_activate' );
|
|
|
|
|
39 |
}
|
40 |
}
|
41 |
+
|
42 |
register_activation_hook( __FILE__, '_action_fw_plugin_activate' );
|
43 |
|
44 |
/** @internal */
|