Version Description
- Fixed #3716,#3561
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.7.22 |
Comparing to | |
See all releases |
Code changes from version 2.7.21 to 2.7.22
framework/core/components/extensions/manager/class--fw-extensions-manager.php
CHANGED
@@ -3679,7 +3679,6 @@ final class _FW_Extensions_Manager
|
|
3679 |
|
3680 |
default:
|
3681 |
trigger_error('Invalid requirement: '. $req_name, E_USER_WARNING);
|
3682 |
-
continue;
|
3683 |
}
|
3684 |
}
|
3685 |
|
3679 |
|
3680 |
default:
|
3681 |
trigger_error('Invalid requirement: '. $req_name, E_USER_WARNING);
|
|
|
3682 |
}
|
3683 |
}
|
3684 |
|
framework/helpers/class-fw-settings-form.php
CHANGED
@@ -274,24 +274,24 @@ abstract class FW_Settings_Form {
|
|
274 |
$old_values = (array)$this->get_values();
|
275 |
|
276 |
if ( ! empty( $_POST[ self::$input_name_reset ] ) ) { // The "Reset" button was pressed
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
);
|
295 |
|
296 |
FW_Flash_Messages::add(
|
297 |
$flash_id,
|
@@ -299,13 +299,15 @@ abstract class FW_Settings_Form {
|
|
299 |
'success'
|
300 |
);
|
301 |
|
302 |
-
if ($this->is_theme_settings()) {
|
303 |
-
do_action('fw_settings_form_reset', $old_values);
|
304 |
} else {
|
305 |
-
do_action('fw:settings-form:'. $this->get_id() .':reset', $old_values);
|
306 |
}
|
307 |
} else { // The "Save" button was pressed
|
308 |
-
$
|
|
|
|
|
309 |
|
310 |
FW_Flash_Messages::add(
|
311 |
$flash_id,
|
@@ -314,9 +316,9 @@ abstract class FW_Settings_Form {
|
|
314 |
);
|
315 |
|
316 |
if ($this->is_theme_settings()) {
|
317 |
-
do_action('fw_settings_form_saved', $old_values);
|
318 |
} else {
|
319 |
-
do_action('fw:settings-form:'. $this->get_id() .':saved', $old_values);
|
320 |
}
|
321 |
}
|
322 |
|
274 |
$old_values = (array)$this->get_values();
|
275 |
|
276 |
if ( ! empty( $_POST[ self::$input_name_reset ] ) ) { // The "Reset" button was pressed
|
277 |
+
/**
|
278 |
+
* Some values that don't relate to design, like API credentials, are useful to not be wiped out.
|
279 |
+
*
|
280 |
+
* Usage:
|
281 |
+
*
|
282 |
+
* add_filter('fw_settings_form_reset:values', '_filter_add_persisted_option', 10, 2);
|
283 |
+
* function _filter_add_persisted_option ($current_persisted, $old_values) {
|
284 |
+
* $value_to_persist = fw_akg('my/multi/key', $old_values);
|
285 |
+
* fw_aks('my/multi/key', $value_to_persist, $current_persisted);
|
286 |
+
*
|
287 |
+
* return $current_persisted;
|
288 |
+
* }
|
289 |
+
*/
|
290 |
+
$new_values = $this->is_theme_settings()
|
291 |
+
? apply_filters( 'fw_settings_form_reset:values', array(), $old_values )
|
292 |
+
: apply_filters( 'fw:settings-form:' . $this->get_id() . ':reset:values', array(), $old_values );
|
293 |
+
|
294 |
+
$this->set_values( $new_values );
|
295 |
|
296 |
FW_Flash_Messages::add(
|
297 |
$flash_id,
|
299 |
'success'
|
300 |
);
|
301 |
|
302 |
+
if ( $this->is_theme_settings() ) {
|
303 |
+
do_action( 'fw_settings_form_reset', $old_values, $new_values );
|
304 |
} else {
|
305 |
+
do_action( 'fw:settings-form:' . $this->get_id() . ':reset', $old_values, $new_values );
|
306 |
}
|
307 |
} else { // The "Save" button was pressed
|
308 |
+
$new_values = fw_get_options_values_from_input( $this->get_options() );
|
309 |
+
|
310 |
+
$this->set_values( $new_values );
|
311 |
|
312 |
FW_Flash_Messages::add(
|
313 |
$flash_id,
|
316 |
);
|
317 |
|
318 |
if ($this->is_theme_settings()) {
|
319 |
+
do_action('fw_settings_form_saved', $old_values, $new_values);
|
320 |
} else {
|
321 |
+
do_action('fw:settings-form:'. $this->get_id() .':saved', $old_values, $new_values);
|
322 |
}
|
323 |
}
|
324 |
|
framework/includes/option-types/multi-select/class-fw-option-type-multi-select.php
CHANGED
@@ -76,10 +76,12 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
76 |
'post' => true,
|
77 |
'page' => true,
|
78 |
),
|
79 |
-
'title' => ''
|
80 |
), $options );
|
81 |
fw_aku( 'limit', $limits );
|
82 |
|
|
|
|
|
83 |
/** @var WPDB $wpdb */
|
84 |
global $wpdb;
|
85 |
|
@@ -108,13 +110,15 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
108 |
return array();
|
109 |
}
|
110 |
|
111 |
-
$
|
112 |
-
'post_type'
|
113 |
-
'post__in'
|
114 |
-
'posts_per_page'
|
115 |
-
'fields'
|
116 |
) );
|
117 |
|
|
|
|
|
118 |
return $query->get_posts();
|
119 |
}
|
120 |
|
@@ -356,8 +360,7 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
356 |
|
357 |
$source = is_array( $option['source'] ) ? $option['source'] : (array) $option['source'];
|
358 |
$items = self::get_posts( (array) $data['value'] );
|
359 |
-
|
360 |
-
$query = new WP_Query( array(
|
361 |
'post_type' => $option['source'],
|
362 |
'post__not_in' => $data['value'],
|
363 |
'posts_per_page' => $option['prepopulate'],
|
@@ -365,6 +368,8 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
365 |
'ignore_sticky_posts' => 1
|
366 |
) );
|
367 |
|
|
|
|
|
368 |
$items = array_merge( $items, $query->get_posts() );
|
369 |
}
|
370 |
|
@@ -504,6 +509,15 @@ if ( ! class_exists( 'FW_Option_Type_Multi_Select' ) ):
|
|
504 |
|
505 |
return $names[ $tax ];
|
506 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
}
|
508 |
|
509 |
add_action( 'wp_ajax_fw_option_type_multi_select_autocomplete',
|
76 |
'post' => true,
|
77 |
'page' => true,
|
78 |
),
|
79 |
+
'title' => ''
|
80 |
), $options );
|
81 |
fw_aku( 'limit', $limits );
|
82 |
|
83 |
+
$limits = self::filter_query_posts( $limits );
|
84 |
+
|
85 |
/** @var WPDB $wpdb */
|
86 |
global $wpdb;
|
87 |
|
110 |
return array();
|
111 |
}
|
112 |
|
113 |
+
$args = self::filter_query_posts( array(
|
114 |
+
'post_type' => get_post_types(),
|
115 |
+
'post__in' => array_map( 'intval', $ids ),
|
116 |
+
'posts_per_page' => $limit,
|
117 |
+
'fields' => 'ids'
|
118 |
) );
|
119 |
|
120 |
+
$query = new WP_Query( $args );
|
121 |
+
|
122 |
return $query->get_posts();
|
123 |
}
|
124 |
|
360 |
|
361 |
$source = is_array( $option['source'] ) ? $option['source'] : (array) $option['source'];
|
362 |
$items = self::get_posts( (array) $data['value'] );
|
363 |
+
$args = self::filter_query_posts( array(
|
|
|
364 |
'post_type' => $option['source'],
|
365 |
'post__not_in' => $data['value'],
|
366 |
'posts_per_page' => $option['prepopulate'],
|
368 |
'ignore_sticky_posts' => 1
|
369 |
) );
|
370 |
|
371 |
+
$query = new WP_Query( $args );
|
372 |
+
|
373 |
$items = array_merge( $items, $query->get_posts() );
|
374 |
}
|
375 |
|
509 |
|
510 |
return $names[ $tax ];
|
511 |
}
|
512 |
+
|
513 |
+
private static function filter_query_posts( $set ) {
|
514 |
+
|
515 |
+
if ( class_exists( 'SitePress' ) ) {
|
516 |
+
$set['suppress_filters'] = true;
|
517 |
+
}
|
518 |
+
|
519 |
+
return apply_filters( 'fw:option-type:multi-select:query_posts', $set );
|
520 |
+
}
|
521 |
}
|
522 |
|
523 |
add_action( 'wp_ajax_fw_option_type_multi_select_autocomplete',
|
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.22';
|
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.0.
|
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.20 =
|
93 |
* Fixed [#3629](https://github.com/ThemeFuse/Unyson/issues/3629)
|
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.0.3
|
6 |
+
Stable tag: 2.7.22
|
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.22 =
|
93 |
+
* Fixed [#3716](https://github.com/ThemeFuse/Unyson/pull/3716),[#3561](https://github.com/ThemeFuse/Unyson/issues/3561)
|
94 |
+
|
95 |
= 2.7.20 =
|
96 |
* Fixed [#3629](https://github.com/ThemeFuse/Unyson/issues/3629)
|
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.22
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|