Skip to content

Commit 99bee52

Browse files
committed
Revert changed made to specific objects to generic objects. My guess as to when options are not saving for some.
Signed-off-by: Kevin Provance <[email protected]>
1 parent 1fd0bcf commit 99bee52

17 files changed

+59
-55
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Redux Changelog
22

3+
## 4.2.7
4+
* Fixed: Options reverting or not saving.
5+
36
## 4.2.6
47
* Fixed: Fatal error if passing null as an option section.
58
* Fixed: Error in connection banner routine.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"main": "gulpfile.js",
44
"name": "redux",
55
"author": "Redux.io",
6-
"version": "4.2.6",
6+
"version": "4.2.7",
77
"license": "GPL-3.0-or-later",
88
"repository": {
99
"type": "git",

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block ed
44
Requires at least: 4.0
55
Requires PHP: 7.1
66
Tested up to: 5.8
7-
Stable tag: 4.2.6
7+
Stable tag: 4.2.7
88
License: GPL-3.0+
99
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
1010

@@ -152,6 +152,9 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
152152

153153
== Changelog ==
154154

155+
= 4.2.7 =
156+
Fixed: Options reverting or not saving.
157+
155158
= 4.2.6 =
156159
Fixed: Fatal error if passing null as an option section.
157160
Fixed: Error in connection banner routine.

redux-core/class-redux-core.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ private function init() {
311311
/**
312312
* Code to execute on framework __construct.
313313
*
314-
* @param ReduxFramework $parent Pointer to ReduxFramework object.
315-
* @param array $args Global arguments array.
314+
* @param object $parent Pointer to ReduxFramework object.
315+
* @param array $args Global arguments array.
316316
*/
317-
public static function core_construct( ReduxFramework $parent, array $args ) {
317+
public static function core_construct( $parent, array $args ) {
318318
self::$third_party_fixes = new Redux_ThirdParty_Fixes( $parent );
319319

320320
Redux_ThemeCheck::get_instance();

redux-core/framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
require_once dirname( __FILE__ ) . '/class-redux-core.php';
2525

26-
Redux_Core::$version = '4.2.6';
26+
Redux_Core::$version = '4.2.7';
2727
Redux_Core::$redux_path = dirname( __FILE__ );
2828
Redux_Core::instance();
2929

redux-core/inc/classes/class-redux-api.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,7 @@ public static function set_sections( string $opt_name = '', array $sections = ar
565565
Redux_Functions_Ex::record_caller( $opt_name );
566566

567567
foreach ( $sections as $section ) {
568-
if ( isset( $section ) && ! empty( $section ) ) {
569-
self::set_section( $opt_name, $section );
570-
}
568+
self::set_section( $opt_name, $section );
571569
}
572570
}
573571

@@ -1584,9 +1582,9 @@ private static function get_all_extension() {
15841582
* Gets all loaded extension for the passed ReduxFramework instance.
15851583
*
15861584
* @param string $opt_name Panel opt_name.
1587-
* @param ReduxFramework|null $instance ReduxFramework instance.
1585+
* @param object|null $instance ReduxFramework instance.
15881586
*/
1589-
public static function get_instance_extension( string $opt_name, ?ReduxFramework $instance ) {
1587+
public static function get_instance_extension( string $opt_name, $instance ) {
15901588
if ( ! empty( self::$uses_extensions[ $opt_name ] ) || empty( $opt_name ) ) {
15911589
return;
15921590
}
@@ -1712,7 +1710,7 @@ public static function remove_demo() {
17121710
/**
17131711
* Function which forces a panel/page to render.
17141712
*
1715-
* @param string|ReduxFramework $redux Panel opt_name or Redux object.
1713+
* @param string|object $redux Panel opt_name or Redux object.
17161714
*/
17171715
public static function render( $redux = '' ) {
17181716
if ( is_string( $redux ) ) {

redux-core/inc/classes/class-redux-class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class Redux_Class {
4040
/**
4141
* Redux_Class constructor.
4242
*
43-
* @param null|ReduxFramework $parent Pointer to ReduxFramework object.
43+
* @param null|object $parent Pointer to ReduxFramework object.
4444
*/
45-
public function __construct( ?ReduxFramework $parent = null ) {
45+
public function __construct( $parent = null ) {
4646
if ( null !== $parent && is_object( $parent ) ) {
4747
$this->parent = $parent;
4848
$this->args = $parent->args;

redux-core/inc/classes/class-redux-enqueue.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ private function register_scripts( $core ) {
352352
/**
353353
* Enqueue fields that are in use.
354354
*
355-
* @param ReduxFramework $core ReduxFramework object.
356-
* @param array $field Field array.
355+
* @param object $core ReduxFramework object.
356+
* @param array $field Field array.
357357
*/
358-
public function enqueue_field( ReduxFramework $core, array $field ) {
358+
public function enqueue_field( $core, array $field ) {
359359
if ( isset( $field['type'] ) && 'callback' !== $field['type'] ) {
360360

361361
/**
@@ -500,10 +500,10 @@ private function enqueue_fields( $core ) {
500500
/**
501501
* Build localize array from field functions, if any.
502502
*
503-
* @param ReduxFramework $core ReduxFramework object.
504-
* @param string $type Field type.
503+
* @param object $core ReduxFramework object.
504+
* @param string $type Field type.
505505
*/
506-
private function build_local_array( ReduxFramework $core, string $type ) {
506+
private function build_local_array( $core, string $type ) {
507507
if ( isset( $core->transients['last_save_mode'] ) && ! empty( $core->transients['notices'][ $type ] ) ) {
508508
$the_total = 0;
509509
$messages = array();

redux-core/inc/classes/class-redux-extension-abstract.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ abstract class Redux_Extension_Abstract {
6868
/**
6969
* Redux_Extension_Abstract constructor.
7070
*
71-
* @param ReduxFramework $parent ReduxFramework pointer.
72-
* @param string $file Extension file.
71+
* @param object $parent ReduxFramework pointer.
72+
* @param string $file Extension file.
7373
*/
74-
public function __construct( ReduxFramework $parent, string $file = '' ) {
74+
public function __construct( $parent, string $file = '' ) {
7575
$this->parent = $parent;
7676

7777
// If the file is not given make sure we have one.

redux-core/inc/classes/class-redux-field.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ public static function make_descriptor() {
149149
/**
150150
* Redux_Field constructor.
151151
*
152-
* @param array|string $field Field array.
153-
* @param array|string $value Field values.
154-
* @param ReduxFramework $parent ReduxFramework object pointer.
152+
* @param array|string $field Field array.
153+
* @param array|string $value Field values.
154+
* @param object $parent ReduxFramework object pointer.
155155
*
156156
* @throws ReflectionException Comment.
157157
*/
158-
public function __construct( $field = array(), $value = null, ReduxFramework $parent = null ) {
158+
public function __construct( $field = array(), $value = null, $parent = null ) {
159159
$this->parent = $parent;
160160
$this->field = $field;
161161
$this->value = $value;

0 commit comments

Comments
 (0)