function comment_subscribe_submit($comment_id, $approved)
{
if ('spam' === $approved) {
return;
}
$comment = get_comment($comment_id);
// Set cookies for this post/comment
$this->set_cookies(isset($_REQUEST['subscribe_comments']), $comment->comment_post_ID, isset($_REQUEST['subscribe_blog']));
if (!isset($_REQUEST['subscribe_comments']) && !isset($_REQUEST['subscribe_blog'])) {
return;
}
$post_ids = array();
if (isset($_REQUEST['subscribe_comments'])) {
$post_ids[] = $comment->comment_post_ID;
}
if (isset($_REQUEST['subscribe_blog'])) {
$post_ids[] = 0;
}
Jetpack_Subscriptions::subscribe($comment->comment_author_email, $post_ids, true, array('source' => 'comment-form', 'widget-in-use' => is_active_widget(false, false, 'blog_subscription', true) ? 'yes' : 'no', 'comment_status' => $approved, 'server_data' => $_SERVER));
}