Skip to content

Commit 413579e

Browse files
committed
widget_areas updated.
1 parent bb62b39 commit 413579e

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

redux-core/inc/extensions/widget_areas/class-redux-extension-widget-areas.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Redux_Extension_Widget_Areas extends Redux_Extension_Abstract {
2929
*
3030
* @var string
3131
*/
32-
public $extension_name = 'Widget Areas';
32+
public string $extension_name = 'Widget Areas';
3333

3434

3535
/**

redux-core/inc/extensions/widget_areas/class-redux-widget-areas.php

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,44 @@ class Redux_Widget_Areas {
2222
/**
2323
* Extension URI.
2424
*
25-
* @var string
25+
* @var null|string
2626
*/
27-
private $extension_url;
27+
private ?string $extension_url;
2828

2929
/** Extension directory.
3030
*
3131
* @var string
3232
*/
33-
private $extension_dir;
33+
private string $extension_dir;
3434

3535
/**
3636
* Array of enabled widget_areas
3737
*
3838
* @since 1.0.0
3939
* @var array
4040
*/
41-
protected $widget_areas = array();
41+
protected array $widget_areas = array();
4242

4343
/**
4444
* Widget array.
4545
*
4646
* @var array
4747
*/
48-
protected $orig = array();
48+
protected array $orig = array();
4949

5050
/**
5151
* ReduxFramework object.
5252
*
53-
* @var object
53+
* @var ReduxFramework
5454
*/
55-
private $parent;
55+
private ReduxFramework $parent;
5656

5757
/**
5858
* Redux_Widget_Areas constructor.
5959
*
60-
* @param object $redux ReduxFramework pointer.
60+
* @param ReduxFramework $redux ReduxFramework pointer.
6161
*/
62-
public function __construct( $redux ) {
62+
public function __construct( ReduxFramework $redux ) {
6363
global $pagenow;
6464

6565
$this->parent = $redux;
@@ -215,13 +215,12 @@ public function register_custom_widget_areas() {
215215

216216
$options = apply_filters( 'redux_custom_widget_args', $options );
217217

218-
if ( is_array( $this->widget_areas ) ) {
219-
foreach ( array_unique( $this->widget_areas ) as $widget_area ) {
220-
$options['class'] = 'redux-custom';
221-
$options['name'] = $widget_area;
222-
$options['id'] = sanitize_key( $widget_area );
223-
register_sidebar( $options );
224-
}
218+
foreach ( array_unique( $this->widget_areas ) as $widget_area ) {
219+
$options['class'] = 'redux-custom';
220+
$options['name'] = $widget_area;
221+
$options['id'] = sanitize_key( $widget_area );
222+
223+
register_sidebar( $options );
225224
}
226225
}
227226

redux-templates/classes/class-templates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Templates {
2222
*
2323
* @var int
2424
*/
25-
public static $content_width = 1200;
25+
public static int $content_width = 1200;
2626

2727
/**
2828
* ReduxTemplates Template.

0 commit comments

Comments
 (0)