Version Description
- Fixed #1993
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.6.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.2 to 2.6.3
framework/core/components/backend.php
CHANGED
@@ -69,6 +69,22 @@ final class _FW_Component_Backend {
|
|
69 |
return 'fw-settings';
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
private function get_current_edit_taxonomy() {
|
73 |
static $cache_current_taxonomy_data = null;
|
74 |
|
@@ -853,7 +869,7 @@ final class _FW_Component_Backend {
|
|
853 |
&&
|
854 |
intval($_POST['post_ID']) === intval($post_id)
|
855 |
&&
|
856 |
-
!empty($_POST[
|
857 |
) {
|
858 |
/**
|
859 |
* This happens on regular post form submit
|
@@ -903,7 +919,7 @@ final class _FW_Component_Backend {
|
|
903 |
break;
|
904 |
}
|
905 |
|
906 |
-
if (empty($_POST[
|
907 |
// this happens on Quick Edit
|
908 |
break;
|
909 |
}
|
@@ -1255,7 +1271,7 @@ final class _FW_Component_Backend {
|
|
1255 |
if ( isset( $_POST['name_prefix'] ) ) {
|
1256 |
$name_prefix = FW_Request::POST( 'name_prefix' );
|
1257 |
} else {
|
1258 |
-
$name_prefix =
|
1259 |
}
|
1260 |
}
|
1261 |
|
@@ -1280,7 +1296,7 @@ final class _FW_Component_Backend {
|
|
1280 |
return $data;
|
1281 |
}
|
1282 |
|
1283 |
-
if ( $values = FW_Request::POST(
|
1284 |
// This is form submit, extract correct values from $_POST values
|
1285 |
$values = fw_get_options_values_from_input( $options, $values );
|
1286 |
} else {
|
@@ -1600,7 +1616,7 @@ final class _FW_Component_Backend {
|
|
1600 |
}
|
1601 |
|
1602 |
if ( ! isset( $data['id_prefix'] ) ) {
|
1603 |
-
$data['id_prefix'] =
|
1604 |
}
|
1605 |
|
1606 |
$data = apply_filters(
|
@@ -2031,7 +2047,7 @@ final class _FW_Component_Backend {
|
|
2031 |
unset($children_data);
|
2032 |
break;
|
2033 |
case 'option':
|
2034 |
-
$setting_id =
|
2035 |
|
2036 |
{
|
2037 |
$args_control = array(
|
69 |
return 'fw-settings';
|
70 |
}
|
71 |
|
72 |
+
/**
|
73 |
+
* @return string
|
74 |
+
* @since 2.6.3
|
75 |
+
*/
|
76 |
+
public function get_options_name_attr_prefix() {
|
77 |
+
return 'fw_options';
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @return string
|
82 |
+
* @since 2.6.3
|
83 |
+
*/
|
84 |
+
public function get_options_id_attr_prefix() {
|
85 |
+
return 'fw-option-';
|
86 |
+
}
|
87 |
+
|
88 |
private function get_current_edit_taxonomy() {
|
89 |
static $cache_current_taxonomy_data = null;
|
90 |
|
869 |
&&
|
870 |
intval($_POST['post_ID']) === intval($post_id)
|
871 |
&&
|
872 |
+
!empty($_POST[ $this->get_options_name_attr_prefix() ]) // this happens on Quick Edit
|
873 |
) {
|
874 |
/**
|
875 |
* This happens on regular post form submit
|
919 |
break;
|
920 |
}
|
921 |
|
922 |
+
if (empty($_POST[ $this->get_options_name_attr_prefix() ])) {
|
923 |
// this happens on Quick Edit
|
924 |
break;
|
925 |
}
|
1271 |
if ( isset( $_POST['name_prefix'] ) ) {
|
1272 |
$name_prefix = FW_Request::POST( 'name_prefix' );
|
1273 |
} else {
|
1274 |
+
$name_prefix = $this->get_options_name_attr_prefix();
|
1275 |
}
|
1276 |
}
|
1277 |
|
1296 |
return $data;
|
1297 |
}
|
1298 |
|
1299 |
+
if ( $values = FW_Request::POST( $this->get_options_name_attr_prefix() ) ) {
|
1300 |
// This is form submit, extract correct values from $_POST values
|
1301 |
$values = fw_get_options_values_from_input( $options, $values );
|
1302 |
} else {
|
1616 |
}
|
1617 |
|
1618 |
if ( ! isset( $data['id_prefix'] ) ) {
|
1619 |
+
$data['id_prefix'] = $this->get_options_id_attr_prefix();
|
1620 |
}
|
1621 |
|
1622 |
$data = apply_filters(
|
2047 |
unset($children_data);
|
2048 |
break;
|
2049 |
case 'option':
|
2050 |
+
$setting_id = $this->get_options_name_attr_prefix() .'['. $opt['id'] .']';
|
2051 |
|
2052 |
{
|
2053 |
$args_control = array(
|
framework/core/extends/class-fw-container-type.php
CHANGED
@@ -100,8 +100,8 @@ abstract class FW_Container_Type
|
|
100 |
{
|
101 |
$data = array_merge(
|
102 |
array(
|
103 |
-
'id_prefix' =>
|
104 |
-
'name_prefix' =>
|
105 |
),
|
106 |
$data
|
107 |
);
|
100 |
{
|
101 |
$data = array_merge(
|
102 |
array(
|
103 |
+
'id_prefix' => fw()->backend->get_options_id_attr_prefix(), // attribute id prefix
|
104 |
+
'name_prefix' => fw()->backend->get_options_name_attr_prefix(), // attribute name prefix
|
105 |
),
|
106 |
$data
|
107 |
);
|
framework/core/extends/class-fw-option-type.php
CHANGED
@@ -75,7 +75,7 @@ abstract class FW_Option_Type
|
|
75 |
*/
|
76 |
final public static function get_default_id_prefix()
|
77 |
{
|
78 |
-
return
|
79 |
}
|
80 |
|
81 |
/**
|
@@ -85,7 +85,7 @@ abstract class FW_Option_Type
|
|
85 |
*/
|
86 |
final public static function get_default_name_prefix()
|
87 |
{
|
88 |
-
return
|
89 |
}
|
90 |
|
91 |
final public function __construct()
|
75 |
*/
|
76 |
final public static function get_default_id_prefix()
|
77 |
{
|
78 |
+
return fw()->backend->get_options_id_attr_prefix();
|
79 |
}
|
80 |
|
81 |
/**
|
85 |
*/
|
86 |
final public static function get_default_name_prefix()
|
87 |
{
|
88 |
+
return fw()->backend->get_options_name_attr_prefix();
|
89 |
}
|
90 |
|
91 |
final public function __construct()
|
framework/helpers/database.php
CHANGED
@@ -516,11 +516,11 @@ class FW_Db_Options_Model_Customizer extends FW_Db_Options_Model {
|
|
516 |
}
|
517 |
|
518 |
protected function get_values($item_id, array $extra_data = array()) {
|
519 |
-
return get_theme_mod(
|
520 |
}
|
521 |
|
522 |
protected function set_values($item_id, $values, array $extra_data = array()) {
|
523 |
-
set_theme_mod(
|
524 |
}
|
525 |
|
526 |
protected function get_options($item_id, array $extra_data = array()) {
|
516 |
}
|
517 |
|
518 |
protected function get_values($item_id, array $extra_data = array()) {
|
519 |
+
return get_theme_mod('fw_options', array());
|
520 |
}
|
521 |
|
522 |
protected function set_values($item_id, $values, array $extra_data = array()) {
|
523 |
+
set_theme_mod('fw_options', $values);
|
524 |
}
|
525 |
|
526 |
protected function get_options($item_id, array $extra_data = array()) {
|
framework/helpers/general.php
CHANGED
@@ -932,7 +932,7 @@ function fw_collect_options(&$result, &$options, $settings = array(), $_recursio
|
|
932 |
*/
|
933 |
function fw_get_options_values_from_input(array $options, $input_array = null) {
|
934 |
if (!is_array($input_array)) {
|
935 |
-
$input_array = FW_Request::POST(
|
936 |
}
|
937 |
|
938 |
$values = array();
|
932 |
*/
|
933 |
function fw_get_options_values_from_input(array $options, $input_array = null) {
|
934 |
if (!is_array($input_array)) {
|
935 |
+
$input_array = FW_Request::POST(fw()->backend->get_options_name_attr_prefix());
|
936 |
}
|
937 |
|
938 |
$values = array();
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.6.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.6.3';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson
|
|
3 |
Tags: page builder, 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.4
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 2.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -83,6 +83,9 @@ Yes; Unyson will work with any theme.
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
86 |
= 2.6.2 =
|
87 |
* Option-types must be loaded on `fw_option_types_init` [action](http://manual.unyson.io/en/latest/options/create-option-type.html?#create-option-type) [#1827](https://github.com/ThemeFuse/Unyson/issues/1827)
|
88 |
* Option-type `icon-v2` refactor
|
3 |
Tags: page builder, 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.4
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 2.6.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 2.6.3 =
|
87 |
+
* Fixed [#1993](https://github.com/ThemeFuse/Unyson/issues/1993)
|
88 |
+
|
89 |
= 2.6.2 =
|
90 |
* Option-types must be loaded on `fw_option_types_init` [action](http://manual.unyson.io/en/latest/options/create-option-type.html?#create-option-type) [#1827](https://github.com/ThemeFuse/Unyson/issues/1827)
|
91 |
* Option-type `icon-v2` refactor
|
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.6.
|
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.6.3
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|