Skip to content

Commit

Permalink
Data type mismatch from select data callbacks. 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 91d00ee commit 70c68e0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 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.1
* Fixed: Type mismatch regarding select boxes and callbacks.

## 4.2.0
* New: Typography features: Top and bottom margins, text-shadow.
* New: Media Image Filters (greyscale, sepia, opacity, contrast, invert, blur, saturate, brightness, hue-rotate).
Expand Down
9 changes: 6 additions & 3 deletions 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.0
Stable tag: 4.2.1
License: GPL-3.0+
License URI: http://www.gnu.org/licenses/gpl-3.0.txt

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

== Changelog ==

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

= 4.2.0 =
* New: Typography features: Top and bottom margins, text shadow.
* New: Typography features: Top and bottom margins, text-shadow.
* New: Media Image Filters (greyscale, sepia, opacity, contrast, invert, blur, saturate, brightness, hue-rotate).
* New: Filters (type, reach, angle) for Gradient color field.
* New: Box Shadow field.
Expand All @@ -162,7 +165,7 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
* Updated: select2 library to 4.1.0.
* Updated: readme.txt to conform to wp.org standards.
* Fixed: Remove PHP 7.2 syntax to keep older versions of PHP 7 happy.
* Fixed: Redux tempates not showing on 'page attributes' for some.
* Fixed: Redux templates not showing on 'page attributes' for some.
* Fixed: Additional PHP 8.0 compatibility.
* Fixed: Widget screen would not load due to conflict with template library.
* Added: WordPress 5.8 compatibility.
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.0';
Redux_Core::$version = '4.2.1';
Redux_Core::$redux_path = dirname( __FILE__ );
Redux_Core::instance();

Expand Down
28 changes: 14 additions & 14 deletions redux-core/inc/classes/class-redux-wordpress-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public function __construct( $parent = null ) {
* Get the data.
*
* @param string|array $type Type.
* @param array $args Args.
* @param array|string $args Args.
* @param string $opt_name Opt name.
* @param string|int $current_value Current value.
* @param bool $ajax Tells if this is an AJAX call.
*
* @return array|mixed|string
*/
public function get( $type, array $args = array(), string $opt_name = '', $current_value = '', bool $ajax = false ) {
public function get( $type, $args = array(), string $opt_name = '', $current_value = '', bool $ajax = false ) {
$opt_name = $this->opt_name;

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

$opt_name = $this->opt_name;
Expand Down Expand Up @@ -486,11 +486,11 @@ private function get_data( string $type, array $args, $current_value ): array {
/**
* Router for translation based on the given post type.
*
* @param string $type Type of data request.
* @param mixed|array $current_value Current value stored in DB.
* @param array $args Arguments for the call.
* @param string $type Type of data request.
* @param mixed|array $current_value Current value stored in DB.
* @param array|string $args Arguments for the call.
*/
private function maybe_get_translation( string $type, &$current_value = '', array $args = array() ) {
private function maybe_get_translation( string $type, &$current_value = '', $args = array() ) {
switch ( $type ) {
case 'categories':
case 'category':
Expand Down Expand Up @@ -602,12 +602,12 @@ private function get_current_data_args( string $type, array $args, $current_valu
/**
* Get default arguments for a given data type.
*
* @param string $type Type of data request.
* @param array $args Arguments for the call.
* @param string $type Type of data request.
* @param array|string $args Arguments for the call.
*
* @return array
* @return array|string
*/
private function get_arg_defaults( string $type, array $args = array() ): array {
private function get_arg_defaults( string $type, $args = array() ) {
// In this section we set the default arguments for each data type.
switch ( $type ) {
case 'categories':
Expand Down
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.0
* Version: 4.2.1
* 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 70c68e0

Please sign in to comment.