Redux Framework - Version 4.2.10

Version Description

Fixed: Output on the frontend triggering error. Fixed: Updated shims to support older extensions not authored by Redux.io

Download this release

Release Info

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

Code changes from version 4.2.9 to 4.2.10

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.9
8
  License: GPL-3.0+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -152,6 +152,10 @@ If you want, you can use the [Gutenberg](https://wordpress.org/plugins/gutenberg
152
 
153
  == Changelog ==
154
 
 
 
 
 
155
  = 4.2.9 =
156
  Fixed: WordPress data class now works properly.
157
 
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
 
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
158
+
159
  = 4.2.9 =
160
  Fixed: WordPress data class now works properly.
161
 
redux-core/framework.php CHANGED
@@ -16,6 +16,8 @@
16
  * @subpackage Core
17
  * @subpackage Core
18
  * @author Redux Framework Team
 
 
19
  */
20
 
21
  // Exit if accessed directly.
@@ -23,7 +25,7 @@ defined( 'ABSPATH' ) || exit;
23
 
24
  require_once dirname( __FILE__ ) . '/class-redux-core.php';
25
 
26
- Redux_Core::$version = '4.2.9';
27
  Redux_Core::$redux_path = dirname( __FILE__ );
28
  Redux_Core::instance();
29
 
@@ -609,7 +611,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
609
  *
610
  * @return array
611
  */
612
- public function get_default_values( string $key, bool $array_key = false ): array {
613
  return $this->options_defaults_class->default_values( $key, $array_key );
614
  }
615
 
@@ -621,7 +623,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
621
  *
622
  * @return array
623
  */
624
- public function get_default_value( string $key, bool $array_key = false ): array {
625
  return $this->options_defaults_class->default_values( $key, $array_key );
626
  }
627
 
@@ -634,7 +636,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
634
  *
635
  * @return array|mixed|string|void
636
  */
637
- public function get_wordpress_data( bool $type = false, array $args = array(), $current_value = null ) {
638
  return $this->wordpress_data->get( $type, $args, $this->args['opt_name'], $current_value );
639
  }
640
 
@@ -647,7 +649,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
647
  *
648
  * @return array
649
  */
650
- public function _validate_values( array $plugin_options, array $options, array $sections ): array { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
651
  if ( ! isset( $this->validate_class ) ) {
652
  $this->validate_class = new Redux_Validation( $this );
653
  }
@@ -671,7 +673,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
671
  *
672
  * @return string
673
  */
674
- public function section_menu( int $k, array $section, string $suffix = '', array $sections = array() ): string {
675
  return $this->render_class->section_menu( $k, $section, $suffix, $sections );
676
  }
677
 
@@ -682,7 +684,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
682
  *
683
  * @return string
684
  */
685
- public function get_header_html( array $field ): string {
686
  return $this->render_class->get_header_html( $field );
687
  }
688
 
@@ -693,7 +695,7 @@ if ( ! class_exists( 'ReduxFramework', false ) ) {
693
  *
694
  * @return bool
695
  */
696
- public function current_user_can( string $permission ): bool {
697
  _deprecated_function( __FUNCTION__, '4.0.0', 'Redux_Helpers::current_user_can' );
698
 
699
  return Redux_Helpers::current_user_can( $permission );
16
  * @subpackage Core
17
  * @subpackage Core
18
  * @author Redux Framework Team
19
+ *
20
+ * @noinspection PhpMissingParamTypeInspection
21
  */
22
 
23
  // Exit if accessed directly.
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
 
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
  *
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
 
636
  *
637
  * @return array|mixed|string|void
638
  */
639
+ public function get_wordpress_data( $type = false, $args = array(), $current_value = null ) {
640
  return $this->wordpress_data->get( $type, $args, $this->args['opt_name'], $current_value );
641
  }
642
 
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
  *
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
  *
685
  * @return string
686
  */
687
+ public function get_header_html( $field ): string {
688
  return $this->render_class->get_header_html( $field );
689
  }
690
 
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 );
redux-core/inc/classes/class-redux-output.php CHANGED
@@ -152,11 +152,14 @@ if ( ! class_exists( 'Redux_Output', false ) ) {
152
  }
153
  }
154
 
155
- if ( ( ( isset( $field['output'] ) && ! empty( $field['output'] ) ) || ( isset( $field['compiler'] ) && ! empty( $field['compiler'] ) ) || 'typography' === $field['type'] || 'icon_select' === $field['type'] ) ) {
156
- $field_object->output( $style_data );
157
- }
158
- if ( isset( $field['media_query'] ) && ! empty( $field['media_query'] ) ) {
159
- $field_object->media_query( $style_data );
 
 
 
160
  }
161
  }
162
 
152
  }
153
  }
154
 
155
+ if ( null !== $style_data ) {
156
+ if ( ( ( isset( $field['output'] ) && ! empty( $field['output'] ) ) || ( isset( $field['compiler'] ) && ! empty( $field['compiler'] ) ) || 'typography' === $field['type'] || 'icon_select' === $field['type'] ) ) {
157
+ $field_object->output( $style_data );
158
+ }
159
+
160
+ if ( isset( $field['media_query'] ) && ! empty( $field['media_query'] ) ) {
161
+ $field_object->media_query( $style_data );
162
+ }
163
  }
164
  }
165
 
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.9
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.10
14
  * Text Domain: redux-framework
15
  * License: GPLv3 or later
16
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
sample/sample-config.php CHANGED
@@ -105,7 +105,7 @@ $args = array(
105
  'admin_bar_priority' => 50,
106
 
107
  // Sets a different name for your global variable other than the opt_name.
108
- 'global_variable' => '',
109
 
110
  // Show the time the page took to load, etc. (forced on while on localhost or when WP_DEBUG is enabled).
111
  'dev_mode' => true,
105
  'admin_bar_priority' => 50,
106
 
107
  // Sets a different name for your global variable other than the opt_name.
108
+ 'global_variable' => $opt_name,
109
 
110
  // Show the time the page took to load, etc. (forced on while on localhost or when WP_DEBUG is enabled).
111
  'dev_mode' => true,
sample/sections/select-fields/select.php CHANGED
@@ -139,6 +139,23 @@ Redux::set_section(
139
  'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
140
  'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
141
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  array(
143
  'id' => 'opt-select-menus',
144
  'type' => 'select',
@@ -237,6 +254,31 @@ Redux::set_section(
237
  'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
238
  'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
239
  ),
 
 
 
 
 
 
 
 
 
240
  ),
241
  )
242
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
140
  'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
141
  ),
142
+ array(
143
+ 'id' => 'opt-select-terms',
144
+ 'type' => 'select',
145
+ 'data' => 'terms',
146
+ 'title' => esc_html__( 'Terms Select Option', 'your-textdomain-here' ),
147
+ 'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
148
+ 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
149
+ ),
150
+ array(
151
+ 'id' => 'opt-multi-select-terms',
152
+ 'type' => 'select',
153
+ 'data' => 'terms',
154
+ 'multi' => true,
155
+ 'title' => esc_html__( 'Terms Multi Select Option', 'your-textdomain-here' ),
156
+ 'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
157
+ 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
158
+ ),
159
  array(
160
  'id' => 'opt-select-menus',
161
  'type' => 'select',
254
  'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
255
  'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
256
  ),
257
+ array(
258
+ 'id' => 'opt-select-callback',
259
+ 'type' => 'select',
260
+ 'data' => 'callback',
261
+ 'args' => 'redux_select_callback',
262
+ 'title' => esc_html__( 'Select Option using a Callback', 'your-textdomain-here' ),
263
+ 'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
264
+ 'desc' => esc_html__( 'The items in this selcect were added via a callback function.', 'your-textdomain-here' ),
265
+ ),
266
  ),
267
  )
268
  );
269
+
270
+ /**
271
+ * Select callback function.
272
+ *
273
+ * @return array
274
+ */
275
+ function redux_select_callback(): array {
276
+ $options = array();
277
+
278
+ $options[0] = esc_html__( 'Zero', 'your-textdomain-here' );
279
+ $options[1] = esc_html__( 'One', 'your-textdomain-here' );
280
+ $options[2] = esc_html__( 'Two', 'your-textdomain-here' );
281
+ $options[3] = esc_html__( 'Three', 'your-textdomain-here' );
282
+
283
+ return $options;
284
+ }