Redux Framework - Version 4.2.11

Version Description

Fixed: Removed type declarations on core return values to support improperly written third-party extensions. Fixed: Added shim to prevent errors on functions calls outdated extensions are still using. Fixed: Removed type declarations on field code to support outdated versions of PHP (PHP 7.4 is the minimum recommendation from WordPress...please update if you are able. https://wordpress.org/about/requirements ). Fixed: Support URL button kicking back a JavaScript error.

Download this release

Release Info

Developer dovyp
Plugin Icon 128x128 Redux Framework
Version 4.2.11
Comparing to
See all releases

Code changes from version 4.2.10 to 4.2.11

readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, block, page builder, block ed
4
  Requires at least: 4.0
5
  Requires PHP: 7.1
6
  Tested up to: 5.8
7
- Stable tag: 4.2.10
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -152,6 +152,12 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
152
 
153
  == Changelog ==
154
 
 
 
 
 
 
 
155
  = 4.2.10 =
156
  Fixed: Output on the frontend triggering error.
157
  Fixed: Updated shims to support older extensions not authored by Redux.io
4
  Requires at least: 4.0
5
  Requires PHP: 7.1
6
  Tested up to: 5.8
7
+ Stable tag: 4.2.11
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
152
 
153
  == Changelog ==
154
 
155
+ = 4.2.11 =
156
+ Fixed: Removed type declarations on core return values to support improperly written third-party extensions.
157
+ Fixed: Added shim to prevent errors on functions calls outdated extensions are still using.
158
+ Fixed: Removed type declarations on field code to support outdated versions of PHP (PHP 7.4 is the minimum recommendation from WordPress...please update if you are able. [https://wordpress.org/about/requirements](https://wordpress.org/about/requirements) ).
159
+ Fixed: Support URL button kicking back a JavaScript error.
160
+
161
  = 4.2.10 =
162
  Fixed: Output on the frontend triggering error.
163
  Fixed: Updated shims to support older extensions not authored by Redux.io
redux-core/framework.php CHANGED
@@ -12,12 +12,16 @@
12
  * You should have received a copy of the GNU General Public License
13
  * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
  *
 
 
 
15
  * @package Redux_Framework
16
  * @subpackage Core
17
  * @subpackage Core
18
  * @author Redux Framework Team
19
  *
20
  * @noinspection PhpMissingParamTypeInspection
 
21
  */
22
 
23
  // Exit if accessed directly.
@@ -25,7 +29,7 @@ defined( 'ABSPATH' ) || exit;
25
 
26
  require_once dirname( __FILE__ ) . '/class-redux-core.php';
27
 
28
- Redux_Core::$version = '4.2.10';
29
  Redux_Core::$redux_path = dirname( __FILE__ );
30
  Redux_Core::instance();
31
 
@@ -553,7 +557,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
553
  *
554
  * @return array
555
  */
556
- public function _default_values(): array { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
557
  if ( ! isset( $this->options_class ) ) {
558
  $this->options_defaults_class = new Redux_Options_Defaults();
559
  $this->options_class = new Redux_Options_Constructor( $this );
@@ -611,7 +615,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
611
  *
612
  * @return array
613
  */
614
- public function get_default_values( $key, $array_key = false ): array {
615
  return $this->options_defaults_class->default_values( $key, $array_key );
616
  }
617
 
@@ -623,7 +627,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
623
  *
624
  * @return array
625
  */
626
- public function get_default_value( $key, $array_key = false ): array {
627
  return $this->options_defaults_class->default_values( $key, $array_key );
628
  }
629
 
@@ -649,7 +653,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
649
  *
650
  * @return array
651
  */
652
- public function _validate_values( $plugin_options, $options, $sections ): array { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
653
  if ( ! isset( $this->validate_class ) ) {
654
  $this->validate_class = new Redux_Validation( $this );
655
  }
@@ -673,7 +677,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
673
  *
674
  * @return string
675
  */
676
- public function section_menu( $k, $section, $suffix = '', $sections = array() ): string {
677
  return $this->render_class->section_menu( $k, $section, $suffix, $sections );
678
  }
679
 
@@ -684,7 +688,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
684
  *
685
  * @return string
686
  */
687
- public function get_header_html( $field ): string {
688
  return $this->render_class->get_header_html( $field );
689
  }
690
 
@@ -695,7 +699,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
695
  *
696
  * @return bool
697
  */
698
- public function current_user_can( $permission ): bool {
699
  _deprecated_function( __FUNCTION__, '4.0.0', 'Redux_Helpers::current_user_can' );
700
 
701
  return Redux_Helpers::current_user_can( $permission );
12
  * You should have received a copy of the GNU General Public License
13
  * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
  *
15
+ * The addition of the noinspection tags is because there are devs writing their
16
+ * in-house extensions improperly, and we have to compensate for that.
17
+ *
18
  * @package Redux_Framework
19
  * @subpackage Core
20
  * @subpackage Core
21
  * @author Redux Framework Team
22
  *
23
  * @noinspection PhpMissingParamTypeInspection
24
+ * @noinspection PhpMissingReturnTypeInspection
25
  */
26
 
27
  // Exit if accessed directly.
29
 
30
  require_once dirname( __FILE__ ) . '/class-redux-core.php';
31
 
32
+ Redux_Core::$version = '4.2.11';
33
  Redux_Core::$redux_path = dirname( __FILE__ );
34
  Redux_Core::instance();
35
 
557
  *
558
  * @return array
559
  */
560
+ public function _default_values() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
561
  if ( ! isset( $this->options_class ) ) {
562
  $this->options_defaults_class = new Redux_Options_Defaults();
563
  $this->options_class = new Redux_Options_Constructor( $this );
615
  *
616
  * @return array
617
  */
618
+ public function get_default_values( $key, $array_key = false ) {
619
  return $this->options_defaults_class->default_values( $key, $array_key );
620
  }
621
 
627
  *
628
  * @return array
629
  */
630
+ public function get_default_value( $key, $array_key = false ) {
631
  return $this->options_defaults_class->default_values( $key, $array_key );
632
  }
633
 
653
  *
654
  * @return array
655
  */
656
+ public function _validate_values( $plugin_options, $options, $sections ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
657
  if ( ! isset( $this->validate_class ) ) {
658
  $this->validate_class = new Redux_Validation( $this );
659
  }
677
  *
678
  * @return string
679
  */
680
+ public function section_menu( $k, $section, $suffix = '', $sections = array() ) {
681
  return $this->render_class->section_menu( $k, $section, $suffix, $sections );
682
  }
683
 
688
  *
689
  * @return string
690
  */
691
+ public function get_header_html( $field ) {
692
  return $this->render_class->get_header_html( $field );
693
  }
694
 
699
  *
700
  * @return bool
701
  */
702
+ public function current_user_can( $permission ) {
703
  _deprecated_function( __FUNCTION__, '4.0.0', 'Redux_Helpers::current_user_can' );
704
 
705
  return Redux_Helpers::current_user_can( $permission );
redux-core/inc/classes/class-redux-field.php CHANGED
@@ -230,11 +230,13 @@ if ( ! class_exists( 'Redux_Field', false ) ) {
230
  }
231
 
232
  /**
233
- * CSS for field output, if set.
234
  *
235
  * @param string $style CSS string.
 
 
236
  */
237
- public function output( string $style = '' ) {
238
  if ( '' !== $style ) {
239
 
240
  // Force output value into an array.
230
  }
231
 
232
  /**
233
+ * CSS for field output, if set (Remove the noinpection line and fix this function when we drop support for PHP 7.1).
234
  *
235
  * @param string $style CSS string.
236
+ *
237
+ * @noinspection PhpMissingParamTypeInspection
238
  */
239
+ public function output( $style = '' ) {
240
  if ( '' !== $style ) {
241
 
242
  // Force output value into an array.
redux-core/inc/classes/class-redux-helpers.php CHANGED
@@ -75,13 +75,13 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
75
  /**
76
  * Deprecated. Gets panel tab number from specified field.
77
  *
78
- * @param object $parent ReduxFramework object.
79
- * @param array $field Field array.
80
  *
81
  * @return int|string
82
  * @deprecated No longer using camelCase naming convention.
83
  */
84
- public static function tabFromField( $parent, array $field ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
85
  _deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::tab_from_field( $parent, $field )' );
86
 
87
  return self::tab_from_field( $parent, $field );
@@ -395,7 +395,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
395
  'lang' => get_locale(),
396
  'wp_debug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
397
  'memory' => WP_MEMORY_LIMIT,
398
- 'localhost' => Redux_Helpers::is_local_host(),
399
  'php' => PHP_VERSION,
400
  'posts' => $pts,
401
  'comments' => array(
@@ -444,9 +444,8 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
444
  $theme['theme_parent_uri'] = $parent_theme->get( 'ThemeURI' );
445
  }
446
 
447
- $data = wp_parse_args( $data, $theme );
448
-
449
- $parts = explode( ' ', Redux_Core::$server['SERVER_SOFTWARE'] );
450
 
451
  foreach ( $parts as $part ) {
452
  if ( '(' === $part[0] ) {
@@ -686,7 +685,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
686
  * Determines deep array status.
687
  *
688
  * @param array|string $needle array to test.
689
- * @param array $haystack Array to search.
690
  *
691
  * @return bool
692
  */
@@ -761,7 +760,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
761
  $themes = wp_get_themes();
762
 
763
  foreach ( $themes as $theme ) {
764
- $path = Redux_Functions_Ex::wp_normalize_path( trailingslashit( $theme->get_theme_root() ) . $theme->get_template() );
765
 
766
  if ( Redux_Functions_Ex::wp_normalize_path( realpath( $path ) ) !== $path ) {
767
  $theme_paths[] = Redux_Functions_Ex::wp_normalize_path( realpath( $path ) );
@@ -1020,7 +1019,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
1020
  *
1021
  * @return array
1022
  */
1023
- public static function compile_system_status( bool $json_output, bool $remote_checks ): array {
1024
  global $wpdb;
1025
 
1026
  $sysinfo = array();
@@ -1263,7 +1262,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
1263
  $outdated_templates = true;
1264
  }
1265
 
1266
- $found_files[ $plugin_name ][] = sprintf( '<code>%s</code> ' . esc_html__( 'version', 'redux-framework' ) . ' <strong style="color:red">%s</strong> ' . esc_html__( 'is out of date. The core version is', 'redux-framework' ) . ' %s', str_replace( WP_CONTENT_DIR . '/themes/', '', $theme_file ), $theme_version ? : '-', $core_version );
1267
  } else {
1268
  $found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', str_replace( WP_CONTENT_DIR . '/themes/', '', $theme_file ) );
1269
  }
@@ -1485,7 +1484,7 @@ if ( ! class_exists( 'Redux_Helpers', false ) ) {
1485
  * 'add_users',
1486
  * ),
1487
  * ).
1488
- * @param int|null $object_id (Optional) ID of the specific object to check against if capability is a "meta" cap.
1489
  * e.g. 'edit_post', 'edit_user', 'edit_page', etc.
1490
  *
1491
  * @return bool Whether the user meets the requirements.
75
  /**
76
  * Deprecated. Gets panel tab number from specified field.
77
  *
78
+ * @param object $parent ReduxFramework object.
79
+ * @param array|string $field Field array.
80
  *
81
  * @return int|string
82
  * @deprecated No longer using camelCase naming convention.
83
  */
84
+ public static function tabFromField( $parent, $field ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
85
  _deprecated_function( __CLASS__ . '::' . __FUNCTION__, 'Redux 4.0', 'Redux_Helpers::tab_from_field( $parent, $field )' );
86
 
87
  return self::tab_from_field( $parent, $field );
395
  'lang' => get_locale(),
396
  'wp_debug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
397
  'memory' => WP_MEMORY_LIMIT,
398
+ 'localhost' => self::is_local_host(),
399
  'php' => PHP_VERSION,
400
  'posts' => $pts,
401
  'comments' => array(
444
  $theme['theme_parent_uri'] = $parent_theme->get( 'ThemeURI' );
445
  }
446
 
447
+ $data = wp_parse_args( $data, $theme );
448
+ $parts = explode( ' ', Redux_Core::$server['SERVER_SOFTWARE'] );
 
449
 
450
  foreach ( $parts as $part ) {
451
  if ( '(' === $part[0] ) {
685
  * Determines deep array status.
686
  *
687
  * @param array|string $needle array to test.
688
+ * @param array $haystack Array to search.
689
  *
690
  * @return bool
691
  */
760
  $themes = wp_get_themes();
761
 
762
  foreach ( $themes as $theme ) {
763
+ $path = Redux_Functions_Ex::wp_normalize_path( trailingslashit( $theme->get_theme_root() ) . $theme->get_template() );
764
 
765
  if ( Redux_Functions_Ex::wp_normalize_path( realpath( $path ) ) !== $path ) {
766
  $theme_paths[] = Redux_Functions_Ex::wp_normalize_path( realpath( $path ) );
1019
  *
1020
  * @return array
1021
  */
1022
+ public static function compile_system_status( bool $json_output = false, bool $remote_checks = false ): array {
1023
  global $wpdb;
1024
 
1025
  $sysinfo = array();
1262
  $outdated_templates = true;
1263
  }
1264
 
1265
+ $found_files[ $plugin_name ][] = sprintf( '<code>%s</code> ' . esc_html__( 'version', 'redux-framework' ) . ' <strong style="color:red">%s</strong> ' . esc_html__( 'is out of date. The core version is', 'redux-framework' ) . ' %s', str_replace( WP_CONTENT_DIR . '/themes/', '', $theme_file ), $theme_version ? $theme_version : '-', $core_version );
1266
  } else {
1267
  $found_files[ $plugin_name ][] = sprintf( '<code>%s</code>', str_replace( WP_CONTENT_DIR . '/themes/', '', $theme_file ) );
1268
  }
1484
  * 'add_users',
1485
  * ),
1486
  * ).
1487
+ * @param int|null $object_id (Optional) ID of the specific object to check against if capability is a "meta" cap.
1488
  * e.g. 'edit_post', 'edit_user', 'edit_page', etc.
1489
  *
1490
  * @return bool Whether the user meets the requirements.
redux-core/inc/classes/class-redux-wordpress-data.php CHANGED
@@ -226,9 +226,9 @@ if ( ! class_exists( 'Redux_WordPress_Data', false ) ) {
226
  * @param array|string $args Arguments to pass.
227
  * @param mixed|array $current_value If a current value already set in the database.
228
  *
229
- * @return array
230
  */
231
- private function get_data( string $type, $args, $current_value ): array {
232
  $args = $this->get_arg_defaults( $type, $args );
233
 
234
  $opt_name = $this->opt_name;
226
  * @param array|string $args Arguments to pass.
227
  * @param mixed|array $current_value If a current value already set in the database.
228
  *
229
+ * @return array|null|string
230
  */
231
+ private function get_data( string $type, $args, $current_value ) {
232
  $args = $this->get_arg_defaults( $type, $args );
233
 
234
  $opt_name = $this->opt_name;
redux-framework.php CHANGED
@@ -10,7 +10,7 @@
10
  * Description: Build better sites in WordPress fast
11
  * Author: Redux.io
12
  * Author URI: http://redux.io
13
- * Version: 4.2.10
14
  * Text Domain: redux-framework
15
  * License: GPLv3 or later
16
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
  * Description: Build better sites in WordPress fast
11
  * Author: Redux.io
12
  * Author URI: http://redux.io
13
+ * Version: 4.2.11
14
  * Text Domain: redux-framework
15
  * License: GPLv3 or later
16
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt