Redux Framework - Version 4.3.7

Version Description

  • Fixed: Incorrect global variable assignment. Thanks, @webbudesign.
  • Release date: January 11, 2022
Download this release

Release Info

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

Code changes from version 4.3.6 to 4.3.7

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.9
7
- Stable tag: 4.3.6
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -108,6 +108,10 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
108
 
109
  == Changelog ==
110
 
 
 
 
 
111
  = 4.3.6 =
112
  * Modified: Update to the Extendify Library.
113
  * Modified: Moved Extendify and Redux templates libraries back to root folder.
4
  Requires at least: 4.0
5
  Requires PHP: 7.1
6
  Tested up to: 5.9
7
+ Stable tag: 4.3.7
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
108
 
109
  == Changelog ==
110
 
111
+ = 4.3.7 =
112
+ * Fixed: Incorrect global variable assignment. Thanks, @webbudesign.
113
+ * Release date: January 11, 2022
114
+
115
  = 4.3.6 =
116
  * Modified: Update to the Extendify Library.
117
  * Modified: Moved Extendify and Redux templates libraries back to root folder.
redux-core/framework.php CHANGED
@@ -29,7 +29,7 @@ defined( 'ABSPATH' ) || exit;
29
 
30
  require_once dirname( __FILE__ ) . '/class-redux-core.php';
31
 
32
- Redux_Core::$version = '4.3.6';
33
  Redux_Core::$redux_path = dirname( __FILE__ );
34
 
35
  /** @noinspection PhpUnhandledExceptionInspection */
29
 
30
  require_once dirname( __FILE__ ) . '/class-redux-core.php';
31
 
32
+ Redux_Core::$version = '4.3.7';
33
  Redux_Core::$redux_path = dirname( __FILE__ );
34
 
35
  /** @noinspection PhpUnhandledExceptionInspection */
redux-core/inc/classes/class-redux-api.php CHANGED
@@ -404,7 +404,7 @@ if ( ! class_exists( 'Redux', false ) ) {
404
  foreach ( self::$sections as $opt_name => $the_sections ) {
405
  if ( ! empty( $the_sections ) ) {
406
  if ( ! self::$init[ $opt_name ] ) {
407
- self::loadRedux( $opt_name );
408
  }
409
  }
410
  }
@@ -905,7 +905,6 @@ if ( ! class_exists( 'Redux', false ) ) {
905
  // Shim for the old method!
906
  if ( is_array( $section_id ) ) {
907
  $field = $section_id;
908
-
909
  if ( isset( $field['section_id'] ) ) {
910
  $section_id = $field['section_id'];
911
  }
@@ -1123,7 +1122,7 @@ if ( ! class_exists( 'Redux', false ) ) {
1123
  }
1124
 
1125
  /**
1126
- * Deprecated Retrieves option panel global argument array.
1127
  *
1128
  * @param string $opt_name Panel opt_name.
1129
  *
@@ -1135,7 +1134,7 @@ if ( ! class_exists( 'Redux', false ) ) {
1135
  }
1136
 
1137
  /**
1138
- * Retrieves option panel global argument array.
1139
  *
1140
  * @param string $opt_name Panel opt_name.
1141
  * @param string $key Argument key name to be returned.
@@ -1224,6 +1223,8 @@ if ( ! class_exists( 'Redux', false ) ) {
1224
 
1225
  $redux = ReduxFrameworkInstances::get_instance( $opt_name );
1226
 
 
 
1227
  $metaboxes = $redux->extensions['metaboxes'];
1228
 
1229
  if ( null === $default || '' === $default ) {
@@ -1690,8 +1691,7 @@ if ( ! class_exists( 'Redux', false ) ) {
1690
 
1691
  /**
1692
  * Method to disables Redux demo mode popup.
1693
- *
1694
- * @noinspection PhpUnused*/
1695
  public static function disable_demo() {
1696
  add_action( 'ReduxFrameworkPlugin_admin_notice', 'Redux::remove_demo' );
1697
  add_action( 'redux_framework_plugin_admin_notice', 'Redux::remove_demo' );
@@ -1707,7 +1707,7 @@ if ( ! class_exists( 'Redux', false ) ) {
1707
  /**
1708
  * Function which forces a panel/page to render.
1709
  *
1710
- * @param string/ReduxFramework $redux Panel opt_name or Redux object.
1711
  */
1712
  public static function render( $redux = '' ) {
1713
  if ( is_string( $redux ) ) {
@@ -1716,7 +1716,6 @@ if ( ! class_exists( 'Redux', false ) ) {
1716
  return;
1717
  }
1718
  }
1719
-
1720
  $enqueue = new Redux_Enqueue( $redux );
1721
  $enqueue->init();
1722
  $panel = new Redux_Panel( $redux );
404
  foreach ( self::$sections as $opt_name => $the_sections ) {
405
  if ( ! empty( $the_sections ) ) {
406
  if ( ! self::$init[ $opt_name ] ) {
407
+ self::load_redux( $opt_name );
408
  }
409
  }
410
  }
905
  // Shim for the old method!
906
  if ( is_array( $section_id ) ) {
907
  $field = $section_id;
 
908
  if ( isset( $field['section_id'] ) ) {
909
  $section_id = $field['section_id'];
910
  }
1122
  }
1123
 
1124
  /**
1125
+ * Deprecated Retries option panel global argument array.
1126
  *
1127
  * @param string $opt_name Panel opt_name.
1128
  *
1134
  }
1135
 
1136
  /**
1137
+ * Retries option panel global argument array.
1138
  *
1139
  * @param string $opt_name Panel opt_name.
1140
  * @param string $key Argument key name to be returned.
1223
 
1224
  $redux = ReduxFrameworkInstances::get_instance( $opt_name );
1225
 
1226
+ // We don't ever need to specify advanced_metaboxes here as all function for metaboxes are core,
1227
+ // and thus, metabox_lite. The extension handles its own functions and is handled by this condition. - kp.
1228
  $metaboxes = $redux->extensions['metaboxes'];
1229
 
1230
  if ( null === $default || '' === $default ) {
1691
 
1692
  /**
1693
  * Method to disables Redux demo mode popup.
1694
+ */
 
1695
  public static function disable_demo() {
1696
  add_action( 'ReduxFrameworkPlugin_admin_notice', 'Redux::remove_demo' );
1697
  add_action( 'redux_framework_plugin_admin_notice', 'Redux::remove_demo' );
1707
  /**
1708
  * Function which forces a panel/page to render.
1709
  *
1710
+ * @param string|object $redux Panel opt_name or Redux object.
1711
  */
1712
  public static function render( $redux = '' ) {
1713
  if ( is_string( $redux ) ) {
1716
  return;
1717
  }
1718
  }
 
1719
  $enqueue = new Redux_Enqueue( $redux );
1720
  $enqueue->init();
1721
  $panel = new Redux_Panel( $redux );
redux-core/inc/classes/class-redux-args.php CHANGED
@@ -380,7 +380,7 @@ if ( ! class_exists( 'Redux_Args', false ) ) {
380
  private function default_cleanup( array $args ): array {
381
 
382
  // Fix the global variable name.
383
- if ( '' === $args['global_variable'] || false !== $args['global_variable'] ) {
384
  $args['global_variable'] = str_replace( '-', '_', $args['opt_name'] );
385
  }
386
 
380
  private function default_cleanup( array $args ): array {
381
 
382
  // Fix the global variable name.
383
+ if ( '' === $args['global_variable'] && false !== $args['global_variable'] ) {
384
  $args['global_variable'] = str_replace( '-', '_', $args['opt_name'] );
385
  }
386
 
redux-core/inc/classes/class-redux-options-constructor.php CHANGED
@@ -548,7 +548,7 @@ if ( ! class_exists( 'Redux_Options_Constructor', false ) ) {
548
  // phpcs:ignore WordPress.NamingConventions.ValidHookName
549
  $field = apply_filters( "redux/options/{$core->args['opt_name']}/field/{$field['id']}", $field );
550
 
551
- if ( empty( $field ) ) {
552
  unset( $core->sections[ $k ]['fields'][ $fieldk ] );
553
  continue;
554
  }
@@ -675,9 +675,9 @@ if ( ! class_exists( 'Redux_Options_Constructor', false ) ) {
675
  *
676
  * @since 1.0.0
677
  * @access public
678
- * @return array|null|string $this->options_defaults
679
  */
680
- public function default_values() {
681
  $core = $this->core();
682
 
683
  if ( ! is_null( $core->sections ) && is_null( $core->options_defaults ) ) {
548
  // phpcs:ignore WordPress.NamingConventions.ValidHookName
549
  $field = apply_filters( "redux/options/{$core->args['opt_name']}/field/{$field['id']}", $field );
550
 
551
+ if ( empty( $field ) || ! $field ) {
552
  unset( $core->sections[ $k ]['fields'][ $fieldk ] );
553
  continue;
554
  }
675
  *
676
  * @since 1.0.0
677
  * @access public
678
+ * @return array $this->options_defaults
679
  */
680
+ public function default_values(): array {
681
  $core = $this->core();
682
 
683
  if ( ! is_null( $core->sections ) && is_null( $core->options_defaults ) ) {
redux-framework.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin URI: http://wordpress.org/plugins/redux-framework
9
  * GitHub URI: reduxframework/redux-framework
10
  * Description: Build better sites in WordPress fast!
11
- * Version: 4.3.6
12
  * Requires at least: 4.0
13
  * Requires PHP: 7.1
14
  * Author: Extendify
8
  * Plugin URI: http://wordpress.org/plugins/redux-framework
9
  * GitHub URI: reduxframework/redux-framework
10
  * Description: Build better sites in WordPress fast!
11
+ * Version: 4.3.7
12
  * Requires at least: 4.0
13
  * Requires PHP: 7.1
14
  * Author: Extendify