fixed subscribe in comments

This commit is contained in:
Jonathan Labreuille
2016-02-09 16:55:00 +01:00
parent 2ae3d8ebdf
commit cac995e15b
4 changed files with 24 additions and 9 deletions

View File

@ -8,13 +8,22 @@ class Comment {
const APPROVED = 1;
const PENDING_APPROVAL = 0;
static function extendForm() {
static function extendLoggedInForm($field) {
$field .= self::getSubscriptionField();
return $field;
}
static function extendLoggedOutForm() {
echo self::getSubscriptionField();
}
static function getSubscriptionField() {
$label = Setting::getValue(
'subscribe.on_comment.label',
__('Yes, add me to your mailing list.')
);
print '<p class="comment-form-mailpoet">
return '<p class="comment-form-mailpoet">
<label for="mailpoet_subscribe_on_comment">
<input
type="checkbox"