Skip to content

Commit 93e900e

Browse files
committed
Customizer => false fixes as well as section customizer_only & customizer overrides for fields.
1 parent 16410c4 commit 93e900e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ReduxCore/framework.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,11 @@ public function _register_settings() {
20402040
$section['title'] = "";
20412041
}
20422042

2043+
if ( isset ( $section['customizer_only'] ) && $section['customizer_only'] == true ) {
2044+
$section['panel'] = false;
2045+
$this->sections[ $k ] = $section;
2046+
}
2047+
20432048
$heading = isset ( $section['heading'] ) ? $section['heading'] : $section['title'];
20442049

20452050
if ( isset ( $section['permissions'] ) ) {
@@ -2124,6 +2129,10 @@ public function _register_settings() {
21242129
$display = false;
21252130
}
21262131

2132+
if ( isset ( $section['customizer'] ) ) {
2133+
$field['customizer'] = $section['customizer'];
2134+
$this->sections[ $k ]['fields'][ $fieldk ] = $field;
2135+
}
21272136

21282137
if ( isset ( $field['permissions'] ) ) {
21292138

ReduxCore/inc/extensions/customizer/extension_customizer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public function __construct( $parent ) {
6363
$this->upload_url = ReduxFramework::$_upload_url . 'advanced-customizer/';
6464

6565
//add_action('wp_head', array( $this, '_enqueue_new' ));
66-
66+
if ( $parent->args['customizer'] == false ) {
67+
return;
68+
}
6769

6870
// Override the ReduxCore class
6971
add_filter( "redux/extension/{$this->parent->args['opt_name']}/customizer", array(

0 commit comments

Comments
 (0)