Skip to content

Commit

Permalink
Merge pull request #1508 from rocklobster-in/dev/6.0
Browse files Browse the repository at this point in the history
Define configValidator even when deactivated
  • Loading branch information
takayukister authored Nov 9, 2024
2 parents 4ba6fbb + 21703a3 commit a447915
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
)
),
),
'configValidator' => array(
'errors' => array(),
'docUrl' => WPCF7_ConfigValidator::get_doc_link(),
),
) );

if (
Expand All @@ -185,12 +189,12 @@ function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
$config_validator = new WPCF7_ConfigValidator( $post );
$config_validator->restore();

$wpcf7_obj = array_merge( $wpcf7_obj, array(
'configValidator' => array(
$wpcf7_obj['configValidator'] = array_merge(
$wpcf7_obj['configValidator'],
array(
'errors' => $config_validator->collect_error_messages(),
'docUrl' => WPCF7_ConfigValidator::get_doc_link(),
),
) );
)
);
}
}

Expand Down

0 comments on commit a447915

Please sign in to comment.