Skip to content

Commit

Permalink
Still chasing type mismatch in WordPress Data class. Version bump
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Provance <kevin.provance@gmail.com>
  • Loading branch information
kprovance committed Jul 28, 2021
1 parent 70c68e0 commit 0dddb7a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Redux Changelog

## 4.2.2
* Fixed: WordPress data options not handling WP_Error properly.

## 4.2.1
* Fixed: Type mismatch regarding select boxes and callbacks.

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.1
Stable tag: 4.2.2
License: GPL-3.0+
License URI: http://www.gnu.org/licenses/gpl-3.0.txt

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

== Changelog ==

= 4.2.2 =
Fixed: WordPress data options not handling WP_Error properly.

= 4.2.1 =
Fixed: Type mismatch regarding select boxes and callbacks.

Expand Down
2 changes: 1 addition & 1 deletion redux-core/framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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

Redux_Core::$version = '4.2.1';
Redux_Core::$version = '4.2.2';
Redux_Core::$redux_path = dirname( __FILE__ );
Redux_Core::instance();

Expand Down
14 changes: 6 additions & 8 deletions redux-core/inc/classes/class-redux-wordpress-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ public function get( $type, $args = array(), string $opt_name = '', $current_val
/**
* Process the results into a proper array, fetching the data elements needed for each data type.
*
* @param array $results Results to process in the data array.
* @param string|bool $id_key Key on object/array that represents the ID.
* @param string|bool $name_key Key on object/array that represents the name/text.
* @param bool $add_key If true, the display key will appear in the text.
* @param string|bool $secondary_key If a data type you'd rather display a different ID as the display key.
* @param array|WP_Error $results Results to process in the data array.
* @param string|bool $id_key Key on object/array that represents the ID.
* @param string|bool $name_key Key on object/array that represents the name/text.
* @param bool $add_key If true, the display key will appear in the text.
* @param string|bool $secondary_key If a data type you'd rather display a different ID as the display key.
*
* @return array
*/
private function process_results( array $results = array(), $id_key = '', $name_key = '', bool $add_key = true, $secondary_key = 'slug' ): array {
private function process_results( $results = array(), $id_key = '', $name_key = '', bool $add_key = true, $secondary_key = 'slug' ): array {
$data = array();
if ( ! empty( $results ) && ! is_a( $results, 'WP_Error' ) ) {
foreach ( $results as $k => $v ) {
Expand Down Expand Up @@ -684,7 +684,5 @@ private function get_arg_defaults( string $type, $args = array() ) {

return $args;
}


}
}
2 changes: 1 addition & 1 deletion redux-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Description: Build better sites in WordPress fast
* Author: Redux.io
* Author URI: http://redux.io
* Version: 4.2.1
* Version: 4.2.2
* Text Domain: redux-framework
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
Expand Down

0 comments on commit 0dddb7a

Please sign in to comment.