Version Description
Fixed: Options reverting or not saving.
Download this release
Release Info
Developer | dovyp |
Plugin | Redux Framework |
Version | 4.2.7 |
Comparing to | |
See all releases |
Code changes from version 4.2.6 to 4.2.7
- readme.txt +4 -1
- redux-core/class-redux-core.php +3 -3
- redux-core/framework.php +1 -1
- redux-core/inc/classes/class-redux-api.php +4 -6
- redux-core/inc/classes/class-redux-class.php +2 -2
- redux-core/inc/classes/class-redux-enqueue.php +6 -6
- redux-core/inc/classes/class-redux-extension-abstract.php +3 -3
- redux-core/inc/classes/class-redux-field.php +4 -4
- redux-core/inc/classes/class-redux-functions-ex.php +6 -6
- redux-core/inc/classes/class-redux-helpers.php +3 -3
- redux-core/inc/classes/class-redux-i18n.php +3 -3
- redux-core/inc/classes/class-redux-output.php +6 -6
- redux-core/inc/classes/class-redux-required.php +4 -4
- redux-core/inc/classes/class-redux-validate.php +5 -5
- redux-framework.php +1 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block ed
|
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 7.1
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 4.2.
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
@@ -152,6 +152,9 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
|
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
155 |
= 4.2.6 =
|
156 |
Fixed: Fatal error if passing null as an option section.
|
157 |
Fixed: Error in connection banner routine.
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 7.1
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 4.2.7
|
8 |
License: GPL-3.0+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 4.2.7 =
|
156 |
+
Fixed: Options reverting or not saving.
|
157 |
+
|
158 |
= 4.2.6 =
|
159 |
Fixed: Fatal error if passing null as an option section.
|
160 |
Fixed: Error in connection banner routine.
|
redux-core/class-redux-core.php
CHANGED
@@ -311,10 +311,10 @@ if ( ! class_exists( 'Redux_Core', false ) ) {
|
|
311 |
/**
|
312 |
* Code to execute on framework __construct.
|
313 |
*
|
314 |
-
* @param
|
315 |
-
* @param array
|
316 |
*/
|
317 |
-
public static function core_construct(
|
318 |
self::$third_party_fixes = new Redux_ThirdParty_Fixes( $parent );
|
319 |
|
320 |
Redux_ThemeCheck::get_instance();
|
311 |
/**
|
312 |
* Code to execute on framework __construct.
|
313 |
*
|
314 |
+
* @param object $parent Pointer to ReduxFramework object.
|
315 |
+
* @param array $args Global arguments array.
|
316 |
*/
|
317 |
+
public static function core_construct( $parent, array $args ) {
|
318 |
self::$third_party_fixes = new Redux_ThirdParty_Fixes( $parent );
|
319 |
|
320 |
Redux_ThemeCheck::get_instance();
|
redux-core/framework.php
CHANGED
@@ -23,7 +23,7 @@ defined( 'ABSPATH' ) || exit;
|
|
23 |
|
24 |
require_once dirname( __FILE__ ) . '/class-redux-core.php';
|
25 |
|
26 |
-
Redux_Core::$version = '4.2.
|
27 |
Redux_Core::$redux_path = dirname( __FILE__ );
|
28 |
Redux_Core::instance();
|
29 |
|
23 |
|
24 |
require_once dirname( __FILE__ ) . '/class-redux-core.php';
|
25 |
|
26 |
+
Redux_Core::$version = '4.2.7';
|
27 |
Redux_Core::$redux_path = dirname( __FILE__ );
|
28 |
Redux_Core::instance();
|
29 |
|
redux-core/inc/classes/class-redux-api.php
CHANGED
@@ -565,9 +565,7 @@ if ( ! class_exists( 'Redux', false ) ) {
|
|
565 |
Redux_Functions_Ex::record_caller( $opt_name );
|
566 |
|
567 |
foreach ( $sections as $section ) {
|
568 |
-
|
569 |
-
self::set_section( $opt_name, $section );
|
570 |
-
}
|
571 |
}
|
572 |
}
|
573 |
|
@@ -1584,9 +1582,9 @@ if ( ! class_exists( 'Redux', false ) ) {
|
|
1584 |
* Gets all loaded extension for the passed ReduxFramework instance.
|
1585 |
*
|
1586 |
* @param string $opt_name Panel opt_name.
|
1587 |
-
* @param
|
1588 |
*/
|
1589 |
-
public static function get_instance_extension( string $opt_name,
|
1590 |
if ( ! empty( self::$uses_extensions[ $opt_name ] ) || empty( $opt_name ) ) {
|
1591 |
return;
|
1592 |
}
|
@@ -1712,7 +1710,7 @@ if ( ! class_exists( 'Redux', false ) ) {
|
|
1712 |
/**
|
1713 |
* Function which forces a panel/page to render.
|
1714 |
*
|
1715 |
-
* @param string|
|
1716 |
*/
|
1717 |
public static function render( $redux = '' ) {
|
1718 |
if ( is_string( $redux ) ) {
|
565 |
Redux_Functions_Ex::record_caller( $opt_name );
|
566 |
|
567 |
foreach ( $sections as $section ) {
|
568 |
+
self::set_section( $opt_name, $section );
|
|
|
|
|
569 |
}
|
570 |
}
|
571 |
|
1582 |
* Gets all loaded extension for the passed ReduxFramework instance.
|
1583 |
*
|
1584 |
* @param string $opt_name Panel opt_name.
|
1585 |
+
* @param object|null $instance ReduxFramework instance.
|
1586 |
*/
|
1587 |
+
public static function get_instance_extension( string $opt_name, $instance ) {
|
1588 |
if ( ! empty( self::$uses_extensions[ $opt_name ] ) || empty( $opt_name ) ) {
|
1589 |
return;
|
1590 |
}
|
1710 |
/**
|
1711 |
* Function which forces a panel/page to render.
|
1712 |
*
|
1713 |
+
* @param string|object $redux Panel opt_name or Redux object.
|
1714 |
*/
|
1715 |
public static function render( $redux = '' ) {
|
1716 |
if ( is_string( $redux ) ) {
|
redux-core/inc/classes/class-redux-class.php
CHANGED
@@ -40,9 +40,9 @@ if ( ! class_exists( 'Redux_Class', false ) ) {
|
|
40 |
/**
|
41 |
* Redux_Class constructor.
|
42 |
*
|
43 |
-
* @param null|
|
44 |
*/
|
45 |
-
public function __construct(
|
46 |
if ( null !== $parent && is_object( $parent ) ) {
|
47 |
$this->parent = $parent;
|
48 |
$this->args = $parent->args;
|
40 |
/**
|
41 |
* Redux_Class constructor.
|
42 |
*
|
43 |
+
* @param null|object $parent Pointer to ReduxFramework object.
|
44 |
*/
|
45 |
+
public function __construct( $parent = null ) {
|
46 |
if ( null !== $parent && is_object( $parent ) ) {
|
47 |
$this->parent = $parent;
|
48 |
$this->args = $parent->args;
|
redux-core/inc/classes/class-redux-enqueue.php
CHANGED
@@ -352,10 +352,10 @@ if ( ! class_exists( 'Redux_Enqueue', false ) ) {
|
|
352 |
/**
|
353 |
* Enqueue fields that are in use.
|
354 |
*
|
355 |
-
* @param
|
356 |
-
* @param array
|
357 |
*/
|
358 |
-
public function enqueue_field(
|
359 |
if ( isset( $field['type'] ) && 'callback' !== $field['type'] ) {
|
360 |
|
361 |
/**
|
@@ -500,10 +500,10 @@ if ( ! class_exists( 'Redux_Enqueue', false ) ) {
|
|
500 |
/**
|
501 |
* Build localize array from field functions, if any.
|
502 |
*
|
503 |
-
* @param
|
504 |
-
* @param string
|
505 |
*/
|
506 |
-
private function build_local_array(
|
507 |
if ( isset( $core->transients['last_save_mode'] ) && ! empty( $core->transients['notices'][ $type ] ) ) {
|
508 |
$the_total = 0;
|
509 |
$messages = array();
|
352 |
/**
|
353 |
* Enqueue fields that are in use.
|
354 |
*
|
355 |
+
* @param object $core ReduxFramework object.
|
356 |
+
* @param array $field Field array.
|
357 |
*/
|
358 |
+
public function enqueue_field( $core, array $field ) {
|
359 |
if ( isset( $field['type'] ) && 'callback' !== $field['type'] ) {
|
360 |
|
361 |
/**
|
500 |
/**
|
501 |
* Build localize array from field functions, if any.
|
502 |
*
|
503 |
+
* @param object $core ReduxFramework object.
|
504 |
+
* @param string $type Field type.
|
505 |
*/
|
506 |
+
private function build_local_array( $core, string $type ) {
|
507 |
if ( isset( $core->transients['last_save_mode'] ) && ! empty( $core->transients['notices'][ $type ] ) ) {
|
508 |
$the_total = 0;
|
509 |
$messages = array();
|
redux-core/inc/classes/class-redux-extension-abstract.php
CHANGED
@@ -68,10 +68,10 @@ abstract class Redux_Extension_Abstract {
|
|
68 |
/**
|
69 |
* Redux_Extension_Abstract constructor.
|
70 |
*
|
71 |
-
* @param
|
72 |
-
* @param string
|
73 |
*/
|
74 |
-
public function __construct(
|
75 |
$this->parent = $parent;
|
76 |
|
77 |
// If the file is not given make sure we have one.
|
68 |
/**
|
69 |
* Redux_Extension_Abstract constructor.
|
70 |
*
|
71 |
+
* @param object $parent ReduxFramework pointer.
|
72 |
+
* @param string $file Extension file.
|
73 |
*/
|
74 |
+
public function __construct( $parent, string $file = '' ) {
|
75 |
$this->parent = $parent;
|
76 |
|
77 |
// If the file is not given make sure we have one.
|
redux-core/inc/classes/class-redux-field.php
CHANGED
@@ -149,13 +149,13 @@ if ( ! class_exists( 'Redux_Field', false ) ) {
|
|
149 |
/**
|
150 |
* Redux_Field constructor.
|
151 |
*
|
152 |
-
* @param array|string
|
153 |
-
* @param array|string
|
154 |
-
* @param
|
155 |
*
|
156 |
* @throws ReflectionException Comment.
|
157 |
*/
|
158 |
-
public function __construct( $field = array(), $value = null,
|
159 |
$this->parent = $parent;
|
160 |
$this->field = $field;
|
161 |
$this->value = $value;
|
149 |
/**
|
150 |
* Redux_Field constructor.
|
151 |
*
|
152 |
+
* @param array|string $field Field array.
|
153 |
+
* @param array|string $value Field values.
|
154 |
+
* @param object $parent ReduxFramework object pointer.
|
155 |
*
|
156 |
* @throws ReflectionException Comment.
|
157 |
*/
|
158 |
+
public function __construct( $field = array(), $value = null, $parent = null ) {
|
159 |
$this->parent = $parent;
|
160 |
$this->field = $field;
|
161 |
$this->value = $value;
|
redux-core/inc/classes/class-redux-functions-ex.php
CHANGED
@@ -351,15 +351,15 @@ if ( ! class_exists( 'Redux_Functions_Ex', false ) ) {
|
|
351 |
/**
|
352 |
* Used to fix 3.x and 4 compatibility for extensions
|
353 |
*
|
354 |
-
* @param
|
355 |
-
* @param string
|
356 |
-
* @param string
|
357 |
-
* @param string
|
358 |
-
* @param string
|
359 |
*
|
360 |
* @return object - Extended field class.
|
361 |
*/
|
362 |
-
public static function extension_compatibility(
|
363 |
if ( empty( $new_class_name ) ) {
|
364 |
return;
|
365 |
}
|
351 |
/**
|
352 |
* Used to fix 3.x and 4 compatibility for extensions
|
353 |
*
|
354 |
+
* @param object $parent The extension parent object.
|
355 |
+
* @param string $path - Path of the file.
|
356 |
+
* @param string $ext_class - Extension class name.
|
357 |
+
* @param string $new_class_name - New dynamic class name.
|
358 |
+
* @param string $name extension name.
|
359 |
*
|
360 |
* @return object - Extended field class.
|
361 |
*/
|
362 |
+
public static function extension_compatibility( $parent, string $path, string $ext_class, string $new_class_name, string $name ) {
|
363 |
if ( empty( $new_class_name ) ) {
|
364 |
return;
|
365 |
}
|
redux-core/inc/classes/class-redux-helpers.php
CHANGED
@@ -145,13 +145,13 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
|
|
145 |
/**
|
146 |
* Deprecated Verifies if field is in use.
|
147 |
*
|
148 |
-
* @param
|
149 |
-
* @param string
|
150 |
*
|
151 |
* @return bool
|
152 |
* @deprecated No longer using camelCase function names.
|
153 |
*/
|
154 |
-
public static function isFieldInUse(
|
155 |
// phpcs:ignore Squiz.PHP.CommentedOutCode
|
156 |
// _deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::is_field_in_use( $parent, $field )' );
|
157 |
return self::is_field_in_use( $parent, $field );
|
145 |
/**
|
146 |
* Deprecated Verifies if field is in use.
|
147 |
*
|
148 |
+
* @param object $parent ReduxFramework object.
|
149 |
+
* @param string $field Field type.
|
150 |
*
|
151 |
* @return bool
|
152 |
* @deprecated No longer using camelCase function names.
|
153 |
*/
|
154 |
+
public static function isFieldInUse( $parent, string $field ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
|
155 |
// phpcs:ignore Squiz.PHP.CommentedOutCode
|
156 |
// _deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::is_field_in_use( $parent, $field )' );
|
157 |
return self::is_field_in_use( $parent, $field );
|
redux-core/inc/classes/class-redux-i18n.php
CHANGED
@@ -18,10 +18,10 @@ if ( ! class_exists( 'Redux_I18n', false ) ) {
|
|
18 |
/**
|
19 |
* Redux_I18n constructor.
|
20 |
*
|
21 |
-
* @param
|
22 |
-
* @param string
|
23 |
*/
|
24 |
-
public function __construct(
|
25 |
parent::__construct( $parent );
|
26 |
|
27 |
$this->load( $file );
|
18 |
/**
|
19 |
* Redux_I18n constructor.
|
20 |
*
|
21 |
+
* @param object $parent ReduxFramework pointer.
|
22 |
+
* @param string $file Translation file.
|
23 |
*/
|
24 |
+
public function __construct( $parent, string $file ) {
|
25 |
parent::__construct( $parent );
|
26 |
|
27 |
$this->load( $file );
|
redux-core/inc/classes/class-redux-output.php
CHANGED
@@ -251,17 +251,17 @@ if ( ! class_exists( 'Redux_Output', false ) ) {
|
|
251 |
/**
|
252 |
* Function to output output_variables to the dynamic output.
|
253 |
*
|
254 |
-
* @param
|
255 |
-
* @param array
|
256 |
-
* @param array
|
257 |
-
* @param array|string
|
258 |
-
* @param string|null
|
259 |
*
|
260 |
* @return void
|
261 |
* @since 4.0.3
|
262 |
* @access public
|
263 |
*/
|
264 |
-
private function output_variables(
|
265 |
// Let's allow section overrides please.
|
266 |
if ( isset( $section['output_variables'] ) && ! isset( $field['output_variables'] ) ) {
|
267 |
$field['output_variables'] = $section['output_variables'];
|
251 |
/**
|
252 |
* Function to output output_variables to the dynamic output.
|
253 |
*
|
254 |
+
* @param object $core ReduxFramework core pointer.
|
255 |
+
* @param array $section Section containing this field.
|
256 |
+
* @param array $field Field object.
|
257 |
+
* @param array|string $value Current value of field.
|
258 |
+
* @param string|null $style_data CSS output string to append to the root output variable.
|
259 |
*
|
260 |
* @return void
|
261 |
* @since 4.0.3
|
262 |
* @access public
|
263 |
*/
|
264 |
+
private function output_variables( $core, array $section = array(), array $field = array(), $value = array(), ?string $style_data = '' ) {
|
265 |
// Let's allow section overrides please.
|
266 |
if ( isset( $section['output_variables'] ) && ! isset( $field['output_variables'] ) ) {
|
267 |
$field['output_variables'] = $section['output_variables'];
|
redux-core/inc/classes/class-redux-required.php
CHANGED
@@ -88,11 +88,11 @@ if ( ! class_exists( 'Redux_Required', false ) ) {
|
|
88 |
/**
|
89 |
* Check field for require deps.
|
90 |
*
|
91 |
-
* @param
|
92 |
-
* @param array
|
93 |
-
* @param array
|
94 |
*/
|
95 |
-
private function check_required_dependencies(
|
96 |
// required field must not be hidden. Otherwise, hide this one by default.
|
97 |
if ( ! in_array( $data['parent'], $core->fields_hidden, true ) && ( ! isset( $core->folds[ $field['id'] ] ) || 'hide' !== $core->folds[ $field['id'] ] ) ) {
|
98 |
if ( isset( $core->options[ $data['parent'] ] ) ) {
|
88 |
/**
|
89 |
* Check field for require deps.
|
90 |
*
|
91 |
+
* @param object $core ReduxFramework core pointer.
|
92 |
+
* @param array $field Field array.
|
93 |
+
* @param array $data Required data.
|
94 |
*/
|
95 |
+
private function check_required_dependencies( $core, array $field, array $data ) {
|
96 |
// required field must not be hidden. Otherwise, hide this one by default.
|
97 |
if ( ! in_array( $data['parent'], $core->fields_hidden, true ) && ( ! isset( $core->folds[ $field['id'] ] ) || 'hide' !== $core->folds[ $field['id'] ] ) ) {
|
98 |
if ( isset( $core->options[ $data['parent'] ] ) ) {
|
redux-core/inc/classes/class-redux-validate.php
CHANGED
@@ -19,12 +19,12 @@ if ( ! class_exists( 'Redux_Validate', false ) ) {
|
|
19 |
/**
|
20 |
* Redux_Validate constructor.
|
21 |
*
|
22 |
-
* @param
|
23 |
-
* @param array
|
24 |
-
* @param array|string
|
25 |
-
* @param mixed
|
26 |
*/
|
27 |
-
public function __construct(
|
28 |
$this->parent = $parent;
|
29 |
$this->field = $field;
|
30 |
$this->value = $value;
|
19 |
/**
|
20 |
* Redux_Validate constructor.
|
21 |
*
|
22 |
+
* @param object $parent ReduxFramework pointer.
|
23 |
+
* @param array $field Fields array.
|
24 |
+
* @param array|string $value Values array.
|
25 |
+
* @param mixed $current Current.
|
26 |
*/
|
27 |
+
public function __construct( $parent, array $field, $value, $current ) {
|
28 |
$this->parent = $parent;
|
29 |
$this->field = $field;
|
30 |
$this->value = $value;
|
redux-framework.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Description: Build better sites in WordPress fast
|
11 |
* Author: Redux.io
|
12 |
* Author URI: http://redux.io
|
13 |
-
* Version: 4.2.
|
14 |
* Text Domain: redux-framework
|
15 |
* License: GPLv3 or later
|
16 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
* Description: Build better sites in WordPress fast
|
11 |
* Author: Redux.io
|
12 |
* Author URI: http://redux.io
|
13 |
+
* Version: 4.2.7
|
14 |
* Text Domain: redux-framework
|
15 |
* License: GPLv3 or later
|
16 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|