applying compact design and updating error messages
This commit is contained in:
@ -92,7 +92,7 @@ class Subscribers extends APIEndpoint {
|
||||
|
||||
if($recaptcha['enabled'] && !isset($data['recaptcha'])) {
|
||||
return $this->badRequest(array(
|
||||
APIError::BAD_REQUEST => __('Please check the reCAPTCHA.', 'mailpoet')
|
||||
APIError::BAD_REQUEST => __('Please check the captcha.', 'mailpoet')
|
||||
));
|
||||
}
|
||||
|
||||
@ -105,13 +105,13 @@ class Subscribers extends APIEndpoint {
|
||||
));
|
||||
if(is_wp_error($res)) {
|
||||
return $this->badRequest(array(
|
||||
APIError::BAD_REQUEST => __('Error while validating the reCAPTCHA.', 'mailpoet')
|
||||
APIError::BAD_REQUEST => __('Error while validating the captcha.', 'mailpoet')
|
||||
));
|
||||
}
|
||||
$res = json_decode($res['body']);
|
||||
if(!$res->success) {
|
||||
return $this->badRequest(array(
|
||||
APIError::BAD_REQUEST => __('Error while validating the reCAPTCHA.', 'mailpoet')
|
||||
APIError::BAD_REQUEST => __('Error while validating the captcha.', 'mailpoet')
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class Renderer {
|
||||
if(Setting::getValue('re_captcha.enabled')) {
|
||||
$submit = array_pop($html);
|
||||
$site_key = Setting::getValue('re_captcha.site_token');
|
||||
$html[] = '<div class="g-recaptcha" data-sitekey="'. $site_key .'"></div>';
|
||||
$html[] = '<div class="g-recaptcha" data-size="compact" data-sitekey="'. $site_key .'"></div>';
|
||||
$html[] = $submit;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user