WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#45090 closed feature request (duplicate)

Confirmation message for anonymous user pending comments if cookies checkbox is not checked

Reported by: dangerouspiper Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.8
Component: Comments Keywords:
Focuses: Cc:

Description

I understand why cannot show a message for comments awaiting moderation to the user that has just post a new comment, if the cookies checkbox is not checked. But it looks like no action was made when the comment it's really posted and awaiting moderation. I solved this sending a get variable on redirect with the following code on my theme

<?php
function comment_posted( $location ) {
    $location .= '?commentsent=yes';
    return $location;
}
add_filter( 'comment_post_redirect', 'comment_posted' ); 

so I can check the variable "commentsent" and show a "general" message when a comment is posted.

Maybe could be helpful that the core sends a get (or post) variable to know if a comment was sent (or even better if a comment awaiting for moderation was sent).

I'm not a developer so excuse me if I'm saying something crazy...

Thank you

Change History (1)

#1 @SergeyBiryukov
9 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from trivial to normal
  • Status changed from new to closed
  • Summary changed from Confirmation message for anonymous user pendding comments if cookies checkbox is not checked to Confirmation message for anonymous user pending comments if cookies checkbox is not checked

Hi @dangerouspiper, welcome to WordPress Trac!

Thanks for the ticket, we're already tracking this enhancement in #43857.

Note: See TracTickets for help on using tickets.