fixing minor issues and adding unit test

This commit is contained in:
Amine Ben hammou
2017-12-26 15:21:16 +00:00
parent 1ad0dce425
commit a8052c118a
8 changed files with 39 additions and 23 deletions

View File

@@ -51,9 +51,6 @@ class Widget extends \WP_Widget {
wp_print_scripts('jquery');
wp_print_scripts('mailpoet_vendor');
wp_print_scripts('mailpoet_public');
if(Setting::getValue('re_captcha.enabled')) {
echo self::RECAPTCHA_API_SCRIPT;
}
$scripts = ob_get_contents();
ob_end_clean();
@@ -278,6 +275,9 @@ EOL;
if(!empty($body)) {
$form_id = $this->id_base . '_' . $form['id'];
if(Setting::getValue('re_captcha.enabled')) {
if(empty($before_widget)) {
$before_widget = '';
}
$before_widget .= self::RECAPTCHA_API_SCRIPT;
}
$data = array(