Version Description
- Fixed #3915,#3861,#3750,#3888,#3738
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.7.23 |
Comparing to | |
See all releases |
Code changes from version 2.7.22 to 2.7.23
- framework/autoload.php +1 -0
- framework/core/components/backend.php +1 -1
- framework/helpers/general.php +1 -1
- framework/includes/hooks.php +1 -0
- framework/includes/option-types/map/class-fw-option-type-map.php +1 -1
- framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php +5 -0
- framework/includes/option-types/simple.php +64 -5
- framework/includes/option-types/wp-editor/includes/class-fw-wp-editor-settings.php +1 -1
- framework/manifest.php +1 -1
- readme.txt +5 -2
- unyson.php +1 -1
framework/autoload.php
CHANGED
@@ -197,6 +197,7 @@ function _fw_includes_option_types_autoload( $class ) {
|
|
197 |
case 'FW_Option_Type_Hidden' :
|
198 |
case 'FW_Option_Type_Text' :
|
199 |
case 'FW_Option_Type_Short_Text' :
|
|
|
200 |
case 'FW_Option_Type_Password' :
|
201 |
case 'FW_Option_Type_Textarea' :
|
202 |
case 'FW_Option_Type_Html' :
|
197 |
case 'FW_Option_Type_Hidden' :
|
198 |
case 'FW_Option_Type_Text' :
|
199 |
case 'FW_Option_Type_Short_Text' :
|
200 |
+
case 'FW_Option_Type_Number' :
|
201 |
case 'FW_Option_Type_Password' :
|
202 |
case 'FW_Option_Type_Textarea' :
|
203 |
case 'FW_Option_Type_Html' :
|
framework/core/components/backend.php
CHANGED
@@ -650,7 +650,7 @@ final class _FW_Component_Backend {
|
|
650 |
* @param string $post_type
|
651 |
* @param WP_Post $post
|
652 |
*/
|
653 |
-
public function _action_create_post_meta_boxes( $post_type, $post ) {
|
654 |
if ( 'comment' === $post_type || ( isset( $_GET['vc_action'] ) && $_GET['vc_action'] === 'vc_inline' ) ) {
|
655 |
/**
|
656 |
* 1. https://github.com/ThemeFuse/Unyson/issues/3052
|
650 |
* @param string $post_type
|
651 |
* @param WP_Post $post
|
652 |
*/
|
653 |
+
public function _action_create_post_meta_boxes( $post_type, $post = null ) {
|
654 |
if ( 'comment' === $post_type || ( isset( $_GET['vc_action'] ) && $_GET['vc_action'] === 'vc_inline' ) ) {
|
655 |
/**
|
656 |
* 1. https://github.com/ThemeFuse/Unyson/issues/3052
|
framework/helpers/general.php
CHANGED
@@ -484,7 +484,7 @@ function fw_attr_to_html( array $attr_array ) {
|
|
484 |
function fw_stripslashes_deep_keys( $value ) {
|
485 |
static $magic_quotes = null;
|
486 |
if ( $magic_quotes === null ) {
|
487 |
-
$magic_quotes =
|
488 |
}
|
489 |
|
490 |
if ( is_array( $value ) ) {
|
484 |
function fw_stripslashes_deep_keys( $value ) {
|
485 |
static $magic_quotes = null;
|
486 |
if ( $magic_quotes === null ) {
|
487 |
+
$magic_quotes = false; //https://www.php.net/manual/en/function.get-magic-quotes-gpc.php - always returns FALSE as of PHP 5.4.0. false fixes https://github.com/ThemeFuse/Unyson/issues/3915
|
488 |
}
|
489 |
|
490 |
if ( is_array( $value ) ) {
|
framework/includes/hooks.php
CHANGED
@@ -16,6 +16,7 @@
|
|
16 |
FW_Option_Type::register( 'FW_Option_Type_Hidden' );
|
17 |
FW_Option_Type::register( 'FW_Option_Type_Text' );
|
18 |
FW_Option_Type::register( 'FW_Option_Type_Short_Text' );
|
|
|
19 |
FW_Option_Type::register( 'FW_Option_Type_Password' );
|
20 |
FW_Option_Type::register( 'FW_Option_Type_Textarea' );
|
21 |
FW_Option_Type::register( 'FW_Option_Type_Html' );
|
16 |
FW_Option_Type::register( 'FW_Option_Type_Hidden' );
|
17 |
FW_Option_Type::register( 'FW_Option_Type_Text' );
|
18 |
FW_Option_Type::register( 'FW_Option_Type_Short_Text' );
|
19 |
+
FW_Option_Type::register( 'FW_Option_Type_Number' );
|
20 |
FW_Option_Type::register( 'FW_Option_Type_Password' );
|
21 |
FW_Option_Type::register( 'FW_Option_Type_Textarea' );
|
22 |
FW_Option_Type::register( 'FW_Option_Type_Html' );
|
framework/includes/option-types/map/class-fw-option-type-map.php
CHANGED
@@ -33,7 +33,7 @@ class FW_Option_Type_Map extends FW_Option_Type {
|
|
33 |
'_fw_option_type_map',
|
34 |
array(
|
35 |
'google_maps_js_uri' => 'https://maps.googleapis.com/maps/api/js?'. http_build_query(array(
|
36 |
-
'v' => '
|
37 |
'libraries' => 'places',
|
38 |
'language' => substr( get_locale(), 0, 2 ),
|
39 |
'key' => self::api_key(),
|
33 |
'_fw_option_type_map',
|
34 |
array(
|
35 |
'google_maps_js_uri' => 'https://maps.googleapis.com/maps/api/js?'. http_build_query(array(
|
36 |
+
'v' => 'quarterly',
|
37 |
'libraries' => 'places',
|
38 |
'language' => substr( get_locale(), 0, 2 ),
|
39 |
'key' => self::api_key(),
|
framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php
CHANGED
@@ -125,6 +125,11 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
125 |
protected static function build_post( $id, $show_type ) {
|
126 |
$title = ( $t = get_the_title( $id ) ) && $t ? $t : esc_html__( 'No title', 'fw' ) . ' - #' . $id;
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
return $show_type ? array(
|
129 |
'val' => $id,
|
130 |
'title' => $title,
|
125 |
protected static function build_post( $id, $show_type ) {
|
126 |
$title = ( $t = get_the_title( $id ) ) && $t ? $t : esc_html__( 'No title', 'fw' ) . ' - #' . $id;
|
127 |
|
128 |
+
if ( class_exists( 'SitePress' ) ) {
|
129 |
+
$wpml_info = wpml_get_language_information( null, $id );
|
130 |
+
$title .= ' (' . strtoupper( $wpml_info['language_code'] ) . ')';
|
131 |
+
}
|
132 |
+
|
133 |
return $show_type ? array(
|
134 |
'val' => $id,
|
135 |
'title' => $title,
|
framework/includes/option-types/simple.php
CHANGED
@@ -153,6 +153,64 @@ class FW_Option_Type_Short_Text extends FW_Option_Type_Text {
|
|
153 |
}
|
154 |
}
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
class FW_Option_Type_Password extends FW_Option_Type {
|
157 |
public function get_type() {
|
158 |
return 'password';
|
@@ -1055,6 +1113,7 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
1055 |
return array(
|
1056 |
'value' => '',
|
1057 |
'length' => 0, // Limit id length
|
|
|
1058 |
);
|
1059 |
}
|
1060 |
|
@@ -1076,9 +1135,9 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
1076 |
* @param null|int $length_limit
|
1077 |
* @return string
|
1078 |
*/
|
1079 |
-
protected function generate_id($length_limit = null)
|
1080 |
{
|
1081 |
-
$id = fw_rand_md5();
|
1082 |
|
1083 |
if ($length_limit) {
|
1084 |
$id = substr($id, 0, (int)$length_limit);
|
@@ -1124,13 +1183,13 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
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 {
|
1129 |
$id = $input_value;
|
1130 |
}
|
1131 |
|
1132 |
if (empty($id) || !is_string($id)) {
|
1133 |
-
$id = $this->generate_id($option['length']);
|
1134 |
}
|
1135 |
|
1136 |
/**
|
@@ -1158,7 +1217,7 @@ class FW_Option_Type_Unique extends FW_Option_Type {
|
|
1158 |
}
|
1159 |
|
1160 |
while ( isset( $ids[ $post_id ][ $id ] ) ) {
|
1161 |
-
$id = $this->generate_id( $option['length'] );
|
1162 |
}
|
1163 |
|
1164 |
$ids[ $post_id ][ $id ] = true;
|
153 |
}
|
154 |
}
|
155 |
|
156 |
+
/**
|
157 |
+
* Class FW_Option_Type_Number
|
158 |
+
*
|
159 |
+
* Add Input type="number" <input type="number">
|
160 |
+
*/
|
161 |
+
class FW_Option_Type_Number extends FW_Option_Type {
|
162 |
+
public function get_type() {
|
163 |
+
return 'number';
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* @internal
|
168 |
+
* {@inheritdoc}
|
169 |
+
*/
|
170 |
+
protected function _enqueue_static( $id, $option, $data ) {
|
171 |
+
}
|
172 |
+
|
173 |
+
protected function _get_data_for_js($id, $option, $data = array()) {
|
174 |
+
return false;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* @param string $id
|
179 |
+
* @param array $option
|
180 |
+
* @param array $data
|
181 |
+
*
|
182 |
+
* @return string
|
183 |
+
*
|
184 |
+
* @internal
|
185 |
+
*/
|
186 |
+
protected function _render( $id, $option, $data ) {
|
187 |
+
$option['attr']['value'] = (string) $data['value'];
|
188 |
+
|
189 |
+
return '<input ' . fw_attr_to_html( $option['attr'] ) . ' type="number" />';
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* @param array $option
|
194 |
+
* @param array|null|string $input_value
|
195 |
+
*
|
196 |
+
* @return string
|
197 |
+
*
|
198 |
+
* @internal
|
199 |
+
*/
|
200 |
+
protected function _get_value_from_input( $option, $input_value ) {
|
201 |
+
return (string) ( is_null( $input_value ) ? $option['value'] : $input_value );
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* @internal
|
206 |
+
*/
|
207 |
+
protected function _get_defaults() {
|
208 |
+
return array(
|
209 |
+
'value' => ''
|
210 |
+
);
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
class FW_Option_Type_Password extends FW_Option_Type {
|
215 |
public function get_type() {
|
216 |
return 'password';
|
1113 |
return array(
|
1114 |
'value' => '',
|
1115 |
'length' => 0, // Limit id length
|
1116 |
+
'prefix' => '', // Prefix for ID
|
1117 |
);
|
1118 |
}
|
1119 |
|
1135 |
* @param null|int $length_limit
|
1136 |
* @return string
|
1137 |
*/
|
1138 |
+
protected function generate_id($length_limit = null, $prefix = '')
|
1139 |
{
|
1140 |
+
$id = $prefix . fw_rand_md5();
|
1141 |
|
1142 |
if ($length_limit) {
|
1143 |
$id = substr($id, 0, (int)$length_limit);
|
1183 |
protected function _get_value_from_input($option, $input_value) {
|
1184 |
|
1185 |
if (is_null($input_value)) {
|
1186 |
+
$id = empty($option['value']) ? $this->generate_id($option['length'], $option['prefix']) : $option['value'];
|
1187 |
} else {
|
1188 |
$id = $input_value;
|
1189 |
}
|
1190 |
|
1191 |
if (empty($id) || !is_string($id)) {
|
1192 |
+
$id = $this->generate_id($option['length'], $option['prefix']);
|
1193 |
}
|
1194 |
|
1195 |
/**
|
1217 |
}
|
1218 |
|
1219 |
while ( isset( $ids[ $post_id ][ $id ] ) ) {
|
1220 |
+
$id = $this->generate_id( $option['length'], $option['prefix'] );
|
1221 |
}
|
1222 |
|
1223 |
$ids[ $post_id ][ $id ] = true;
|
framework/includes/option-types/wp-editor/includes/class-fw-wp-editor-settings.php
CHANGED
@@ -189,7 +189,7 @@ class FW_WP_Editor_Manager {
|
|
189 |
&&
|
190 |
!empty($setting)
|
191 |
&&
|
192 |
-
in_array($setting
|
193 |
&&
|
194 |
! is_null($decoded = json_decode($setting))
|
195 |
) {
|
189 |
&&
|
190 |
!empty($setting)
|
191 |
&&
|
192 |
+
in_array($setting[0], array('[', '{'), true) // [0] fixes https://github.com/ThemeFuse/Unyson/issues/3915
|
193 |
&&
|
194 |
! is_null($decoded = json_decode($setting))
|
195 |
) {
|
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.23';
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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: 5.
|
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.22 =
|
93 |
* Fixed [#3716](https://github.com/ThemeFuse/Unyson/pull/3716),[#3561](https://github.com/ThemeFuse/Unyson/issues/3561)
|
94 |
|
2 |
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: 5.3.2
|
6 |
+
Stable tag: 2.7.23
|
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.23 =
|
93 |
+
* Fixed [#3915](https://github.com/ThemeFuse/Unyson/issues/3915),[#3861](https://github.com/ThemeFuse/Unyson/pull/3861),[#3750](https://github.com/ThemeFuse/Unyson/issues/3750),[#3888](https://github.com/ThemeFuse/Unyson/pull/3888),[#3738](https://github.com/ThemeFuse/Unyson/pull/3738)
|
94 |
+
|
95 |
= 2.7.22 =
|
96 |
* Fixed [#3716](https://github.com/ThemeFuse/Unyson/pull/3716),[#3561](https://github.com/ThemeFuse/Unyson/issues/3561)
|
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+
|
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.23
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|