minor fixes

This commit is contained in:
Amine Ben hammou
2018-01-15 09:53:03 +00:00
parent 5bf532a750
commit 6e94db24a2
3 changed files with 9 additions and 9 deletions

View File

@ -16,6 +16,8 @@ if(!defined('ABSPATH')) exit;
class Widget extends \WP_Widget {
private $renderer;
const RECAPTCHA_API_URL = 'https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit';
function __construct() {
parent::__construct(
'mailpoet_form',
@ -49,7 +51,7 @@ class Widget extends \WP_Widget {
wp_print_scripts('jquery');
wp_print_scripts('mailpoet_vendor');
wp_print_scripts('mailpoet_public');
echo '<script src="https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit" async defer></script>';
echo '<script src="'.self::RECAPTCHA_API_URL.'" async defer></script>';
$scripts = ob_get_contents();
ob_end_clean();
@ -114,7 +116,7 @@ class Widget extends \WP_Widget {
if(!empty($captcha['enabled'])) {
wp_enqueue_script(
'mailpoet_recaptcha',
'https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit',
self::RECAPTCHA_API_URL,
array('mailpoet_public')
);
}