Opened 6 years ago
Closed 5 years ago
#47461 closed defect (bug) (fixed)
The message "This is a preview, your comment will be visible after it has been approved." is not shown in all themes
Reported by: | superpoincare | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Bundled Theme | Keywords: | has-screenshots has-patch |
Focuses: | Cc: |
Description
In #43857, there was a fix which among other things added the message
This is a preview, your comment will be visible after it has been approved.
But for reasons I am fascinated about, it doesn't appear in all themes when a comment is made and the commenter doesn't choose to opt-in with "Save my name, email, and website in this browser for the next time I comment."
Screenshots
Twenty Nineteen:
Twenty Seventeen:
Twenty Sixteen:
Twenty Fifteen:
Twenty Fourteen:
Twenty Thirteen:
Twenty Twelve:
Twenty Eleven:
Twenty Ten:
Attachments (1)
Change History (8)
#2
@
6 years ago
- Keywords has-screenshots added
- Version changed from 5.2.1 to 5.1
Here are the existing moderation notes from the core comment walker Walker_Comment
:
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-includes/class-walker-comment.php#L267
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-includes/class-walker-comment.php#L357
#3
@
6 years ago
Good findings. The text for comment awaiting moderation can be found in the callback function itself as in Twenty Twelve:
#4
@
6 years ago
- Keywords has-patch needs-testing added
@superpoincare here's a suggestion for a patch in 47461.diff. It might need some testing.
The wp_get_current_commenter()
function was introduced in WordPress version 2.0.4, from the year 2006, so it should have existed before Twenty Ten was introduced.
#5
@
5 years ago
- Keywords needs-testing removed
- Milestone changed from Awaiting Review to 5.3
47461.diff applies cleanly and seems to fix the comment moderation message in the 4 affected themes. Adding this to 5.3
milestone.
Thanks for the patch @birgire and for reporting @superpoincare!
Good catch @superpoincare
Four default themes seems to override the native comment walker or parts of it that contains the adjusted comment moderation note:
1) Twenty Ten defines it's own callback:
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentyten/comments.php#L70
Here's the comment's moderation note in
twentyten_comment()
:https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentyten/functions.php#L429
2) Twenty Eleven defines it's own callback:
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentyeleven/comments.php#L68
Here's the comment's moderation note in
twentyeleven_comment()
:https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentyeleven/functions.php#L747
3) Twenty Twelve defines it's own callback:
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentytwelve/comments.php#L51
Here's the comment's moderation note in
twentytwelve_comment()
:https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentytwelve/functions.php#L446
4) Twenty Nineteen defines it's own walker:
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentynineteen/comments.php#L76
The comment's moderation note from the custom walker:
https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php#L99