Skip to content

Commit 54e0484

Browse files
committed
Compensating for improperly written metaboxes for CPT.
Signed-off-by: Kev Provance <[email protected]>
1 parent 8d1412c commit 54e0484

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

redux-core/framework.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,8 @@ public function _validate_values( $plugin_options, $options, $sections ) { // ph
773773
if ( ! isset( $this->validate_class ) ) {
774774
$this->validate_class = new Redux_Validation( $this );
775775
}
776-
return $this->validate_class->validate( $plugin_options, $options, $sections );
776+
777+
return $this->validate_class->validate( $plugin_options, $options, $sections );
777778
}
778779

779780
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ class Redux_Validation extends Redux_Class {
3232
public function validate( array $plugin_options, array $options, array $sections ): array {
3333
$core = $this->core();
3434

35+
if (null === $core) {
36+
return $plugin_options;
37+
}
38+
3539
foreach ( $sections as $k => $section ) {
3640
if ( isset( $section['fields'] ) ) {
3741
foreach ( $section['fields'] as $fkey => $field ) {

0 commit comments

Comments
 (0)