diff --git a/CHANGELOG.md b/CHANGELOG.md index 17255f6cd..bd0d960b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Redux Changelog +## 4.2.7 +* Fixed: Options reverting or not saving. + ## 4.2.6 * Fixed: Fatal error if passing null as an option section. * Fixed: Error in connection banner routine. diff --git a/package.json b/package.json index 4f9ca6a73..88dc87956 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "main": "gulpfile.js", "name": "redux", "author": "Redux.io", - "version": "4.2.6", + "version": "4.2.7", "license": "GPL-3.0-or-later", "repository": { "type": "git", diff --git a/readme.txt b/readme.txt index 91c84eff0..a2d56d363 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block ed Requires at least: 4.0 Requires PHP: 7.1 Tested up to: 5.8 -Stable tag: 4.2.6 +Stable tag: 4.2.7 License: GPL-3.0+ License URI: http://www.gnu.org/licenses/gpl-3.0.txt @@ -152,6 +152,9 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg == Changelog == += 4.2.7 = +Fixed: Options reverting or not saving. + = 4.2.6 = Fixed: Fatal error if passing null as an option section. Fixed: Error in connection banner routine. diff --git a/redux-core/class-redux-core.php b/redux-core/class-redux-core.php index 1040f70b3..951fc25c3 100644 --- a/redux-core/class-redux-core.php +++ b/redux-core/class-redux-core.php @@ -311,10 +311,10 @@ private function init() { /** * Code to execute on framework __construct. * - * @param ReduxFramework $parent Pointer to ReduxFramework object. - * @param array $args Global arguments array. + * @param object $parent Pointer to ReduxFramework object. + * @param array $args Global arguments array. */ - public static function core_construct( ReduxFramework $parent, array $args ) { + public static function core_construct( $parent, array $args ) { self::$third_party_fixes = new Redux_ThirdParty_Fixes( $parent ); Redux_ThemeCheck::get_instance(); diff --git a/redux-core/framework.php b/redux-core/framework.php index b0b5474fd..25538f567 100644 --- a/redux-core/framework.php +++ b/redux-core/framework.php @@ -23,7 +23,7 @@ require_once dirname( __FILE__ ) . '/class-redux-core.php'; -Redux_Core::$version = '4.2.6'; +Redux_Core::$version = '4.2.7'; Redux_Core::$redux_path = dirname( __FILE__ ); Redux_Core::instance(); diff --git a/redux-core/inc/classes/class-redux-api.php b/redux-core/inc/classes/class-redux-api.php index 284b59ec8..6cd08618b 100644 --- a/redux-core/inc/classes/class-redux-api.php +++ b/redux-core/inc/classes/class-redux-api.php @@ -565,9 +565,7 @@ public static function set_sections( string $opt_name = '', array $sections = ar Redux_Functions_Ex::record_caller( $opt_name ); foreach ( $sections as $section ) { - if ( isset( $section ) && ! empty( $section ) ) { - self::set_section( $opt_name, $section ); - } + self::set_section( $opt_name, $section ); } } @@ -1584,9 +1582,9 @@ private static function get_all_extension() { * Gets all loaded extension for the passed ReduxFramework instance. * * @param string $opt_name Panel opt_name. - * @param ReduxFramework|null $instance ReduxFramework instance. + * @param object|null $instance ReduxFramework instance. */ - public static function get_instance_extension( string $opt_name, ?ReduxFramework $instance ) { + public static function get_instance_extension( string $opt_name, $instance ) { if ( ! empty( self::$uses_extensions[ $opt_name ] ) || empty( $opt_name ) ) { return; } @@ -1712,7 +1710,7 @@ public static function remove_demo() { /** * Function which forces a panel/page to render. * - * @param string|ReduxFramework $redux Panel opt_name or Redux object. + * @param string|object $redux Panel opt_name or Redux object. */ public static function render( $redux = '' ) { if ( is_string( $redux ) ) { diff --git a/redux-core/inc/classes/class-redux-class.php b/redux-core/inc/classes/class-redux-class.php index c5cae2098..3a75e7b4e 100644 --- a/redux-core/inc/classes/class-redux-class.php +++ b/redux-core/inc/classes/class-redux-class.php @@ -40,9 +40,9 @@ class Redux_Class { /** * Redux_Class constructor. * - * @param null|ReduxFramework $parent Pointer to ReduxFramework object. + * @param null|object $parent Pointer to ReduxFramework object. */ - public function __construct( ?ReduxFramework $parent = null ) { + public function __construct( $parent = null ) { if ( null !== $parent && is_object( $parent ) ) { $this->parent = $parent; $this->args = $parent->args; diff --git a/redux-core/inc/classes/class-redux-enqueue.php b/redux-core/inc/classes/class-redux-enqueue.php index f06cdfe0d..312f92c8e 100644 --- a/redux-core/inc/classes/class-redux-enqueue.php +++ b/redux-core/inc/classes/class-redux-enqueue.php @@ -352,10 +352,10 @@ private function register_scripts( $core ) { /** * Enqueue fields that are in use. * - * @param ReduxFramework $core ReduxFramework object. - * @param array $field Field array. + * @param object $core ReduxFramework object. + * @param array $field Field array. */ - public function enqueue_field( ReduxFramework $core, array $field ) { + public function enqueue_field( $core, array $field ) { if ( isset( $field['type'] ) && 'callback' !== $field['type'] ) { /** @@ -500,10 +500,10 @@ private function enqueue_fields( $core ) { /** * Build localize array from field functions, if any. * - * @param ReduxFramework $core ReduxFramework object. - * @param string $type Field type. + * @param object $core ReduxFramework object. + * @param string $type Field type. */ - private function build_local_array( ReduxFramework $core, string $type ) { + private function build_local_array( $core, string $type ) { if ( isset( $core->transients['last_save_mode'] ) && ! empty( $core->transients['notices'][ $type ] ) ) { $the_total = 0; $messages = array(); diff --git a/redux-core/inc/classes/class-redux-extension-abstract.php b/redux-core/inc/classes/class-redux-extension-abstract.php index cd459188b..9178255d9 100644 --- a/redux-core/inc/classes/class-redux-extension-abstract.php +++ b/redux-core/inc/classes/class-redux-extension-abstract.php @@ -68,10 +68,10 @@ abstract class Redux_Extension_Abstract { /** * Redux_Extension_Abstract constructor. * - * @param ReduxFramework $parent ReduxFramework pointer. - * @param string $file Extension file. + * @param object $parent ReduxFramework pointer. + * @param string $file Extension file. */ - public function __construct( ReduxFramework $parent, string $file = '' ) { + public function __construct( $parent, string $file = '' ) { $this->parent = $parent; // If the file is not given make sure we have one. diff --git a/redux-core/inc/classes/class-redux-field.php b/redux-core/inc/classes/class-redux-field.php index e80f7dfb7..0590f28b4 100644 --- a/redux-core/inc/classes/class-redux-field.php +++ b/redux-core/inc/classes/class-redux-field.php @@ -149,13 +149,13 @@ public static function make_descriptor() { /** * Redux_Field constructor. * - * @param array|string $field Field array. - * @param array|string $value Field values. - * @param ReduxFramework $parent ReduxFramework object pointer. + * @param array|string $field Field array. + * @param array|string $value Field values. + * @param object $parent ReduxFramework object pointer. * * @throws ReflectionException Comment. */ - public function __construct( $field = array(), $value = null, ReduxFramework $parent = null ) { + public function __construct( $field = array(), $value = null, $parent = null ) { $this->parent = $parent; $this->field = $field; $this->value = $value; diff --git a/redux-core/inc/classes/class-redux-functions-ex.php b/redux-core/inc/classes/class-redux-functions-ex.php index 89ad1c874..10e81c844 100644 --- a/redux-core/inc/classes/class-redux-functions-ex.php +++ b/redux-core/inc/classes/class-redux-functions-ex.php @@ -351,15 +351,15 @@ public static function is_inside_theme( string $file = '' ) { /** * Used to fix 3.x and 4 compatibility for extensions * - * @param ReduxFramework $parent The extension parent object. - * @param string $path - Path of the file. - * @param string $ext_class - Extension class name. - * @param string $new_class_name - New dynamic class name. - * @param string $name extension name. + * @param object $parent The extension parent object. + * @param string $path - Path of the file. + * @param string $ext_class - Extension class name. + * @param string $new_class_name - New dynamic class name. + * @param string $name extension name. * * @return object - Extended field class. */ - public static function extension_compatibility( ReduxFramework $parent, string $path, string $ext_class, string $new_class_name, string $name ) { + public static function extension_compatibility( $parent, string $path, string $ext_class, string $new_class_name, string $name ) { if ( empty( $new_class_name ) ) { return; } diff --git a/redux-core/inc/classes/class-redux-helpers.php b/redux-core/inc/classes/class-redux-helpers.php index 5d773dd61..1b15c579b 100644 --- a/redux-core/inc/classes/class-redux-helpers.php +++ b/redux-core/inc/classes/class-redux-helpers.php @@ -145,13 +145,13 @@ public static function is_field_in_use_by_type( array $fields, array $field = ar /** * Deprecated Verifies if field is in use. * - * @param ReduxFramework $parent ReduxFramework object. - * @param string $field Field type. + * @param object $parent ReduxFramework object. + * @param string $field Field type. * * @return bool * @deprecated No longer using camelCase function names. */ - public static function isFieldInUse( ReduxFramework $parent, string $field ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName + public static function isFieldInUse( $parent, string $field ): bool { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName // phpcs:ignore Squiz.PHP.CommentedOutCode // _deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::is_field_in_use( $parent, $field )' ); return self::is_field_in_use( $parent, $field ); diff --git a/redux-core/inc/classes/class-redux-i18n.php b/redux-core/inc/classes/class-redux-i18n.php index 0d0a44506..cdadcdc72 100644 --- a/redux-core/inc/classes/class-redux-i18n.php +++ b/redux-core/inc/classes/class-redux-i18n.php @@ -18,10 +18,10 @@ class Redux_I18n extends Redux_Class { /** * Redux_I18n constructor. * - * @param ReduxFramework $parent ReduxFramework pointer. - * @param string $file Translation file. + * @param object $parent ReduxFramework pointer. + * @param string $file Translation file. */ - public function __construct( ReduxFramework $parent, string $file ) { + public function __construct( $parent, string $file ) { parent::__construct( $parent ); $this->load( $file ); diff --git a/redux-core/inc/classes/class-redux-output.php b/redux-core/inc/classes/class-redux-output.php index 9692608a5..b2487f31d 100644 --- a/redux-core/inc/classes/class-redux-output.php +++ b/redux-core/inc/classes/class-redux-output.php @@ -251,17 +251,17 @@ public function add_style_attributes( string $html = '', string $handle = '', st /** * Function to output output_variables to the dynamic output. * - * @param ReduxFramework $core ReduxFramework core pointer. - * @param array $section Section containing this field. - * @param array $field Field object. - * @param array|string $value Current value of field. - * @param string|null $style_data CSS output string to append to the root output variable. + * @param object $core ReduxFramework core pointer. + * @param array $section Section containing this field. + * @param array $field Field object. + * @param array|string $value Current value of field. + * @param string|null $style_data CSS output string to append to the root output variable. * * @return void * @since 4.0.3 * @access public */ - private function output_variables( ReduxFramework $core, array $section = array(), array $field = array(), $value = array(), ?string $style_data = '' ) { + private function output_variables( $core, array $section = array(), array $field = array(), $value = array(), ?string $style_data = '' ) { // Let's allow section overrides please. if ( isset( $section['output_variables'] ) && ! isset( $field['output_variables'] ) ) { $field['output_variables'] = $section['output_variables']; diff --git a/redux-core/inc/classes/class-redux-required.php b/redux-core/inc/classes/class-redux-required.php index e34c04d3e..325115ee2 100644 --- a/redux-core/inc/classes/class-redux-required.php +++ b/redux-core/inc/classes/class-redux-required.php @@ -88,11 +88,11 @@ public function check_dependencies( array $field ) { /** * Check field for require deps. * - * @param ReduxFramework $core ReduxFramework core pointer. - * @param array $field Field array. - * @param array $data Required data. + * @param object $core ReduxFramework core pointer. + * @param array $field Field array. + * @param array $data Required data. */ - private function check_required_dependencies( ReduxFramework $core, array $field, array $data ) { + private function check_required_dependencies( $core, array $field, array $data ) { // required field must not be hidden. Otherwise, hide this one by default. if ( ! in_array( $data['parent'], $core->fields_hidden, true ) && ( ! isset( $core->folds[ $field['id'] ] ) || 'hide' !== $core->folds[ $field['id'] ] ) ) { if ( isset( $core->options[ $data['parent'] ] ) ) { diff --git a/redux-core/inc/classes/class-redux-validate.php b/redux-core/inc/classes/class-redux-validate.php index 2a46f2cff..a7c95bf38 100644 --- a/redux-core/inc/classes/class-redux-validate.php +++ b/redux-core/inc/classes/class-redux-validate.php @@ -19,12 +19,12 @@ abstract class Redux_Validate { /** * Redux_Validate constructor. * - * @param ReduxFramework $parent ReduxFramework pointer. - * @param array $field Fields array. - * @param array|string $value Values array. - * @param mixed $current Current. + * @param object $parent ReduxFramework pointer. + * @param array $field Fields array. + * @param array|string $value Values array. + * @param mixed $current Current. */ - public function __construct( ReduxFramework $parent, array $field, $value, $current ) { + public function __construct( $parent, array $field, $value, $current ) { $this->parent = $parent; $this->field = $field; $this->value = $value; diff --git a/redux-framework.php b/redux-framework.php index 3820b14f9..3c951b1de 100644 --- a/redux-framework.php +++ b/redux-framework.php @@ -10,7 +10,7 @@ * Description: Build better sites in WordPress fast * Author: Redux.io * Author URI: http://redux.io - * Version: 4.2.6 + * Version: 4.2.7 * Text Domain: redux-framework * License: GPLv3 or later * License URI: http://www.gnu.org/licenses/gpl-3.0.txt