Skip to content

Commit 70c68e0

Browse files
committed
Data type mismatch from select data callbacks. Version bump
Signed-off-by: Kevin Provance <[email protected]>
1 parent 91d00ee commit 70c68e0

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
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.1
4+
* Fixed: Type mismatch regarding select boxes and callbacks.
5+
36
## 4.2.0
47
* New: Typography features: Top and bottom margins, text-shadow.
58
* New: Media Image Filters (greyscale, sepia, opacity, contrast, invert, blur, saturate, brightness, hue-rotate).

readme.txt

Lines changed: 6 additions & 3 deletions
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.0
7+
Stable tag: 4.2.1
88
License: GPL-3.0+
99
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
1010

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

153153
== Changelog ==
154154

155+
= 4.2.1 =
156+
Fixed: Type mismatch regarding select boxes and callbacks.
157+
155158
= 4.2.0 =
156-
* New: Typography features: Top and bottom margins, text shadow.
159+
* New: Typography features: Top and bottom margins, text-shadow.
157160
* New: Media Image Filters (greyscale, sepia, opacity, contrast, invert, blur, saturate, brightness, hue-rotate).
158161
* New: Filters (type, reach, angle) for Gradient color field.
159162
* New: Box Shadow field.
@@ -162,7 +165,7 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
162165
* Updated: select2 library to 4.1.0.
163166
* Updated: readme.txt to conform to wp.org standards.
164167
* Fixed: Remove PHP 7.2 syntax to keep older versions of PHP 7 happy.
165-
* Fixed: Redux tempates not showing on 'page attributes' for some.
168+
* Fixed: Redux templates not showing on 'page attributes' for some.
166169
* Fixed: Additional PHP 8.0 compatibility.
167170
* Fixed: Widget screen would not load due to conflict with template library.
168171
* Added: WordPress 5.8 compatibility.

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

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ public function __construct( $parent = null ) {
4040
* Get the data.
4141
*
4242
* @param string|array $type Type.
43-
* @param array $args Args.
43+
* @param array|string $args Args.
4444
* @param string $opt_name Opt name.
4545
* @param string|int $current_value Current value.
4646
* @param bool $ajax Tells if this is an AJAX call.
4747
*
4848
* @return array|mixed|string
4949
*/
50-
public function get( $type, array $args = array(), string $opt_name = '', $current_value = '', bool $ajax = false ) {
50+
public function get( $type, $args = array(), string $opt_name = '', $current_value = '', bool $ajax = false ) {
5151
$opt_name = $this->opt_name;
5252

5353
// We don't want to run this, it's not a string value. Send it back!
@@ -222,13 +222,13 @@ private function order_data( array $data = array(), string $sort = 'value', stri
222222
/**
223223
* Fetch the data for a given type.
224224
*
225-
* @param string $type The data type we're fetching.
226-
* @param array $args Arguments to pass.
227-
* @param mixed|array $current_value If a current value already set in the database.
225+
* @param string $type The data type we're fetching.
226+
* @param array|string $args Arguments to pass.
227+
* @param mixed|array $current_value If a current value already set in the database.
228228
*
229229
* @return array
230230
*/
231-
private function get_data( string $type, array $args, $current_value ): array {
231+
private function get_data( string $type, $args, $current_value ): array {
232232
$args = $this->get_arg_defaults( $type, $args );
233233

234234
$opt_name = $this->opt_name;
@@ -486,11 +486,11 @@ private function get_data( string $type, array $args, $current_value ): array {
486486
/**
487487
* Router for translation based on the given post type.
488488
*
489-
* @param string $type Type of data request.
490-
* @param mixed|array $current_value Current value stored in DB.
491-
* @param array $args Arguments for the call.
489+
* @param string $type Type of data request.
490+
* @param mixed|array $current_value Current value stored in DB.
491+
* @param array|string $args Arguments for the call.
492492
*/
493-
private function maybe_get_translation( string $type, &$current_value = '', array $args = array() ) {
493+
private function maybe_get_translation( string $type, &$current_value = '', $args = array() ) {
494494
switch ( $type ) {
495495
case 'categories':
496496
case 'category':
@@ -602,12 +602,12 @@ private function get_current_data_args( string $type, array $args, $current_valu
602602
/**
603603
* Get default arguments for a given data type.
604604
*
605-
* @param string $type Type of data request.
606-
* @param array $args Arguments for the call.
605+
* @param string $type Type of data request.
606+
* @param array|string $args Arguments for the call.
607607
*
608-
* @return array
608+
* @return array|string
609609
*/
610-
private function get_arg_defaults( string $type, array $args = array() ): array {
610+
private function get_arg_defaults( string $type, $args = array() ) {
611611
// In this section we set the default arguments for each data type.
612612
switch ( $type ) {
613613
case 'categories':

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.0
13+
* Version: 4.2.1
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)