Skip to content

Commit e99dba4

Browse files
committed
Add global arg custom_fonts to disable/enable the extension.
Signed-off-by: Kev Provance <kevin.provance@gmail.com>
1 parent 521f2fb commit e99dba4

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public function __construct( ReduxFramework $redux, array $args ) {
164164
'load_on_cron' => false,
165165
'search' => false,
166166
'widget_area' => false,
167+
'custom_fonts' => true,
167168
);
168169

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

redux-core/inc/extensions/custom_fonts/class-redux-extension-custom-fonts.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class Redux_Extension_Custom_Fonts extends Redux_Extension_Abstract {
107107
* @access public
108108
*/
109109
public function __construct( $redux ) {
110+
if ( false === $redux->args['custom_fonts'] ) {
111+
return;
112+
}
113+
110114
parent::__construct( $redux, __FILE__ );
111115

112116
self::$instance = parent::get_instance();

sample/sample-config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@
219219
'network_admin' => true,
220220
'search' => true,
221221
'widget_area' => true,
222+
'custom_fonts' => true,
222223
);
223224

224225

0 commit comments

Comments
 (0)