Upgarded to 4.17.4

This commit is contained in:
2022-06-23 13:17:18 +01:00
parent 80f1e87db9
commit a04fb0c7af
404 changed files with 54683 additions and 4417 deletions

View File

@ -67,8 +67,25 @@ class ET_Core_API_Spam_ReCaptcha extends ET_Core_API_Spam_Provider {
}
public function is_enabled() {
return isset( $this->data['site_key'], $this->data['secret_key'] )
$has_recaptcha_module = true;
if ( class_exists( 'ET_Dynamic_Assets' ) ) {
$et_dynamic_module_framework = et_builder_dynamic_module_framework();
$is_dynamic_framework_enabled = et_builder_is_frontend() && 'on' === $et_dynamic_module_framework;
$is_dynamic_css_enabled = et_builder_is_frontend() && et_use_dynamic_css();
if ( $is_dynamic_framework_enabled && $is_dynamic_css_enabled ) {
$et_dynamic_assets = ET_Dynamic_Assets::init();
$saved_shortcodes = $et_dynamic_assets->get_saved_page_shortcodes();
$recaptcha_modules = array( 'et_pb_contact_form', 'et_pb_signup' );
$has_recaptcha_module = ! empty( array_intersect( $saved_shortcodes, $recaptcha_modules ) );
}
}
$has_key = isset( $this->data['site_key'], $this->data['secret_key'] )
&& et_()->all( array( $this->data['site_key'], $this->data['secret_key'] ) );
return $has_key && $has_recaptcha_module;
}
/**