[wp-trac] [WordPress Trac] #43857: Show the comment / awaiting moderation message even without opt-in

WordPress Trac noreply at wordpress.org
Sat Jan 19 12:19:46 UTC 2019


#43857: Show the comment / awaiting moderation message even without opt-in
--------------------------+-----------------------
 Reporter:  imath         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  5.1
Component:  Privacy       |     Version:  4.9.6
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by imath):

 * keywords:  has-patch needs-refresh => has-patch


Comment:

 Hi @pento

 [https://core.trac.wordpress.org/raw-attachment/ticket/43857/43857.8.diff
 43857.8.diff] is the new patch that followes your recommandations.

 1. I was not able to reproduce the issue you've found when permalinks are
 plain. I get something like this: `http://site.url/?p=1&unapproved=7
 &moderation-hash=a80413952f193db0cb127ce2ebaf7fd2#comment-7`

 2. The message "Your comment is awaiting moderation." is output into
 `Walker_Comment`, if I added a complementary message as you requested,
 there's not guarantee it will be output to the user as themes can override
 this class.
 Most "teen" themes are not overriding the class but TwentyNineteen does,
 should I also update `TwentyNineteen_Walker_Comment` to make sure the
 specific message is also output ?

 3. About `wp_remove_feedback_query_args()` I removed all the code as I was
 using it to be sure the URL looked the same as before 4.9.6.

 4. About `wp_get_current_commenter()` I removed all the code and created a
 new function `wp_get_unapproved_commenter_email()` as there are two
 functions where we need to check for the current commenter :
 - `wp_list_comments()`
 - `comments_template()`

 5. I've added a unit test named
 `test_comments_list_should_include_just_posted_unapproved_comment()`

 6. Code formatting issues, I ran `composer run format` on all edited
 files.

 7. About typos or more globally english text: as I'm not english, if there
 are still a handful of typos, could you or someone who's english tell me
 where they are and what is the fix ?

 8. The patch is now using `hash_equals()` to compare the hash.

 I'm happy to improve the patch if needed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43857#comment:83>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list