Skip to content

Commit 077262e

Browse files
committed
Add widget_area argument to global args to disable the extension.
Signed-off-by: Kev Provance <kevin.provance@gmail.com>
1 parent 1309553 commit 077262e

File tree

8 files changed

+12
-8
lines changed

8 files changed

+12
-8
lines changed

.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"browser": true,
44
"node": true
55
},
6-
"parser": "babel-eslint",
6+
//"parser": "babel-eslint",
77
"rules": {
88
"quotes": [
99
2,
1010
"single"
1111
]
1212
},
1313
"plugins": [
14-
"react"
14+
//"react"
1515
],
1616
"parserOptions": {
1717
"ecmaVersion": 8,

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"website": "https://redux.io/"
2929
},
3030
"require": {
31-
"php": ">=7.1.0",
31+
"php": ">=7.4.0",
3232
"fortawesome/font-awesome": "^6.0",
3333
"oomphinc/composer-installers-extender": "^2.0"
3434
},

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-core/assets/css/redux-fields.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-core/assets/css/redux-fields.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-core/inc/classes/class-redux-args.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public function __construct( ReduxFramework $redux, array $args ) {
163163
'font_display' => 'swap', // block|swap|fallback|optional.
164164
'load_on_cron' => false,
165165
'search' => false,
166+
'widget_area' => false,
166167
);
167168

168169
$args = Redux_Functions::parse_args( $args, $default );

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public function __construct( ReduxFramework $redux ) {
7272
add_action( 'init', array( &$this, 'register_custom_widget_areas' ), 1000 );
7373

7474
if ( 'widgets.php' === $pagenow ) {
75-
add_action( 'admin_print_scripts', array( $this, 'add_new_widget_area_box' ) );
75+
if ( true === $redux->args['widget_area'] ) {
76+
add_action( 'admin_print_scripts', array( $this, 'add_new_widget_area_box' ) );
77+
}
7678
add_action( 'load-widgets.php', array( $this, 'add_widget_area_area' ), 100 );
7779
add_action( 'load-widgets.php', array( $this, 'enqueue' ), 100 );
7880
}

sample/sample-config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
'database' => '',
219219
'network_admin' => true,
220220
'search' => true,
221+
'widget_area' => true,
221222
);
222223

223224

0 commit comments

Comments
 (0)