Skip to content

Commit 0dddb7a

Browse files
committed
Still chasing type mismatch in WordPress Data class. Version bump
Signed-off-by: Kevin Provance <[email protected]>
1 parent 70c68e0 commit 0dddb7a

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
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.2
4+
* Fixed: WordPress data options not handling WP_Error properly.
5+
36
## 4.2.1
47
* Fixed: Type mismatch regarding select boxes and callbacks.
58

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.1
7+
Stable tag: 4.2.2
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.2 =
156+
Fixed: WordPress data options not handling WP_Error properly.
157+
155158
= 4.2.1 =
156159
Fixed: Type mismatch regarding select boxes and callbacks.
157160

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.1';
26+
Redux_Core::$version = '4.2.2';
2727
Redux_Core::$redux_path = dirname( __FILE__ );
2828
Redux_Core::instance();
2929

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ public function get( $type, $args = array(), string $opt_name = '', $current_val
142142
/**
143143
* Process the results into a proper array, fetching the data elements needed for each data type.
144144
*
145-
* @param array $results Results to process in the data array.
146-
* @param string|bool $id_key Key on object/array that represents the ID.
147-
* @param string|bool $name_key Key on object/array that represents the name/text.
148-
* @param bool $add_key If true, the display key will appear in the text.
149-
* @param string|bool $secondary_key If a data type you'd rather display a different ID as the display key.
145+
* @param array|WP_Error $results Results to process in the data array.
146+
* @param string|bool $id_key Key on object/array that represents the ID.
147+
* @param string|bool $name_key Key on object/array that represents the name/text.
148+
* @param bool $add_key If true, the display key will appear in the text.
149+
* @param string|bool $secondary_key If a data type you'd rather display a different ID as the display key.
150150
*
151151
* @return array
152152
*/
153-
private function process_results( array $results = array(), $id_key = '', $name_key = '', bool $add_key = true, $secondary_key = 'slug' ): array {
153+
private function process_results( $results = array(), $id_key = '', $name_key = '', bool $add_key = true, $secondary_key = 'slug' ): array {
154154
$data = array();
155155
if ( ! empty( $results ) && ! is_a( $results, 'WP_Error' ) ) {
156156
foreach ( $results as $k => $v ) {
@@ -684,7 +684,5 @@ private function get_arg_defaults( string $type, $args = array() ) {
684684

685685
return $args;
686686
}
687-
688-
689687
}
690688
}

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.1
13+
* Version: 4.2.2
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)