diff --git a/inc/theme-article.php b/inc/theme-article.php index da5afd6..a4d0c90 100644 --- a/inc/theme-article.php +++ b/inc/theme-article.php @@ -229,9 +229,11 @@ function comment_err($a) exit; } +if (!function_exists('comment_callback')): function comment_callback() { $comment = wp_handle_comment_submission(wp_unslash($_POST)); + $commenter = wp_get_current_commenter(); if (is_wp_error($comment)) { $data = $comment->get_error_data(); if (!empty($data)) { @@ -243,6 +245,11 @@ function comment_callback() $user = wp_get_current_user(); do_action('set_comment_cookies', $comment, $user); $GLOBALS['comment'] = $comment; + if ($commenter['comment_author_email']) { + $moderation_note = __('Your comment is awaiting moderation.'); + } else { + $moderation_note = __('Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.'); + } ?>