[wp-trac] [WordPress Trac] #45090: Confirmation message for anonymous user pendding comments if cookies checkbox is not checked
WordPress Trac
noreply at wordpress.org
Mon Oct 15 00:12:21 UTC 2018
#45090: Confirmation message for anonymous user pendding comments if cookies
checkbox is not checked
-----------------------------+-----------------------------
Reporter: dangerouspiper | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.9.8
Severity: trivial | Keywords:
Focuses: |
-----------------------------+-----------------------------
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
<?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
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45090>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list