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;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@ public static function is_inside_theme( string $file = '' ) {
351351
/**
352352
* Used to fix 3.x and 4 compatibility for extensions
353353
*
354-
* @param ReduxFramework $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.
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.
359359
*
360360
* @return object - Extended field class.
361361
*/
362-
public static function extension_compatibility( ReduxFramework $parent, string $path, string $ext_class, string $new_class_name, string $name ) {
362+
public static function extension_compatibility( $parent, string $path, string $ext_class, string $new_class_name, string $name ) {
363363
if ( empty( $new_class_name ) ) {
364364
return;
365365
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ public static function is_field_in_use_by_type( array $fields, array $field = ar
145145
/**
146146
* Deprecated Verifies if field is in use.
147147
*
148-
* @param ReduxFramework $parent ReduxFramework object.
149-
* @param string $field Field type.
148+
* @param object $parent ReduxFramework object.
149+
* @param string $field Field type.
150150
*
151151
* @return bool
152152
* @deprecated No longer using camelCase function names.
153153
*/
154-
public static function isFieldInUse( ReduxFramework $parent, string $field ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
154+
public static function isFieldInUse( $parent, string $field ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
155155
// phpcs:ignore Squiz.PHP.CommentedOutCode
156156
// _deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::is_field_in_use( $parent, $field )' );
157157
return self::is_field_in_use( $parent, $field );

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ class Redux_I18n extends Redux_Class {
1818
/**
1919
* Redux_I18n constructor.
2020
*
21-
* @param ReduxFramework $parent ReduxFramework pointer.
22-
* @param string $file Translation file.
21+
* @param object $parent ReduxFramework pointer.
22+
* @param string $file Translation file.
2323
*/
24-
public function __construct( ReduxFramework $parent, string $file ) {
24+
public function __construct( $parent, string $file ) {
2525
parent::__construct( $parent );
2626

2727
$this->load( $file );

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,17 @@ public function add_style_attributes( string $html = '', string $handle = '', st
251251
/**
252252
* Function to output output_variables to the dynamic output.
253253
*
254-
* @param ReduxFramework $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.
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.
259259
*
260260
* @return void
261261
* @since 4.0.3
262262
* @access public
263263
*/
264-
private function output_variables( ReduxFramework $core, array $section = array(), array $field = array(), $value = array(), ?string $style_data = '' ) {
264+
private function output_variables( $core, array $section = array(), array $field = array(), $value = array(), ?string $style_data = '' ) {
265265
// Let's allow section overrides please.
266266
if ( isset( $section['output_variables'] ) && ! isset( $field['output_variables'] ) ) {
267267
$field['output_variables'] = $section['output_variables'];

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ public function check_dependencies( array $field ) {
8888
/**
8989
* Check field for require deps.
9090
*
91-
* @param ReduxFramework $core ReduxFramework core pointer.
92-
* @param array $field Field array.
93-
* @param array $data Required data.
91+
* @param object $core ReduxFramework core pointer.
92+
* @param array $field Field array.
93+
* @param array $data Required data.
9494
*/
95-
private function check_required_dependencies( ReduxFramework $core, array $field, array $data ) {
95+
private function check_required_dependencies( $core, array $field, array $data ) {
9696
// required field must not be hidden. Otherwise, hide this one by default.
9797
if ( ! in_array( $data['parent'], $core->fields_hidden, true ) && ( ! isset( $core->folds[ $field['id'] ] ) || 'hide' !== $core->folds[ $field['id'] ] ) ) {
9898
if ( isset( $core->options[ $data['parent'] ] ) ) {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ abstract class Redux_Validate {
1919
/**
2020
* Redux_Validate constructor.
2121
*
22-
* @param ReduxFramework $parent ReduxFramework pointer.
23-
* @param array $field Fields array.
24-
* @param array|string $value Values array.
25-
* @param mixed $current Current.
22+
* @param object $parent ReduxFramework pointer.
23+
* @param array $field Fields array.
24+
* @param array|string $value Values array.
25+
* @param mixed $current Current.
2626
*/
27-
public function __construct( ReduxFramework $parent, array $field, $value, $current ) {
27+
public function __construct( $parent, array $field, $value, $current ) {
2828
$this->parent = $parent;
2929
$this->field = $field;
3030
$this->value = $value;

redux-framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Description: Build better sites in WordPress fast
1111
* Author: Redux.io
1212
* Author URI: http://redux.io
13-
* Version: 4.2.6
13+
* Version: 4.2.7
1414
* Text Domain: redux-framework
1515
* License: GPLv3 or later
1616
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt

0 commit comments

Comments
 (0)