The question here is if someone could help me to make the comment "Your comment is awaiting moderation" work correctly for custom page. It works ok for standard Wordpress page but not for my own page.
I use native wp function get_comments()
and wp_list_comments()
to get and display comments. If I submit new comment that awaits moderation the comment and the message Your comment is awaiting moderation
is accessible to anyone.
I always thought that the awaiting comments is visible only to the user that submitted the comment. If it's not the case what is purpose of the message if anyone is able to see the comment? The one purpose I can think of is that it is a kind of notice that this comment will be moderated in the future and could be deleted.
If really everyone can see the comment that it would make sense if the message reads This comment is awaiting moderation
. Is there any way how to change the text of the message from a plugin?
UPDATE
ok, so it is my code. If I display the page using standard wp way it works ok. If I use my code it doesn't work (meaning everyone can see the comment with awaiting message. Would someone know what I need to add to my code to make it work? I use just two above functions. The code is something like that
$comments = get_comments(array(
'post_id' => $post_id,
'status' => 'approve'
));
wp_list_comments(array(
// 'page' => 1,
'per_page' => 10,
'avatar_size' => 16,
), $comments);