Make WordPress Core

Opened 21 months ago

Last modified 4 weeks ago

#43805 reviewing enhancement

Add "in reply to" in comment moderation email notification

Reported by: galbaras Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch has-unit-tests
Focuses: administration Cc:
PR Number:

Description (last modified by SergeyBiryukov)

The comment moderation notification email provides quick ways to moderate comments, which can save time and hassle.

Sadly, the "in reply to" information, which is available on the moderation page, is missing from these emails, so moderators lack some of the context of the comment.

As you can imagine, the meaning of a comment is vastly different when it relates to the post, as opposed to some stupid comment that someone made, and may make a difference to the moderation outcome.

Therefore, at least when reply threading is enabled, moderation emails should include the "in reply to" comment link and author name.

While we're at it, both the moderation page and email would benefit from the actual replied-to comment to be shown, in order to avoid the hassle of another page load to enable proper moderation.

This can be done in combination with #33627, where every change done on the moderation page is also reflected in the emails.

Attachments (3)

43805.diff (718 bytes) - added by danieltj 21 months ago.
Include post parent URL in notify mod email
43805.2.diff (1011 bytes) - added by andraganescu 6 weeks ago.
Refreshed patch 43805.diff
43805.3.diff (5.7 KB) - added by imath 4 weeks ago.

Download all attachments as: .zip

Change History (12)

#1 @danieltj
21 months ago

  • Keywords needs-patch added

I'm for adding an in reply to link with a link to the comment within the wp-admin, but I'm against any other information. Considering the fact you're moderating the reply, having the replied to comment itself doesn't seem necessary here.

21 months ago

Include post parent URL in notify mod email

#2 @danieltj
21 months ago

  • Focuses administration added
  • Keywords has-patch needs-testing added; needs-patch removed

I've added 43805.diff which includes the URL to the parent comment if one has been set. I was going to change the milestone to Future Release but let's see what people think. Haven't managed to test the patch yet, but if someone wants to give it a try and provide any feedback, please do.

#3 @SergeyBiryukov
21 months ago

  • Description modified (diff)

#5 @SergeyBiryukov
7 months ago

  • Milestone changed from Awaiting Review to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @davidbaumwald
4 months ago

  • Milestone changed from 5.3 to Future Release

This ticket hasn't received much attention this cycle. With the deadline for enhancements in 5.3 now passed with Beta 1, this is being moved to Future Release.

#7 @SergeyBiryukov
6 weeks ago

  • Milestone changed from Future Release to 5.4

6 weeks ago

Refreshed patch 43805.diff

#8 @andraganescu
6 weeks ago

I refreshed the patch in 43805.2.diff because the existing one did not apply cleanly with grunt patch:43805.

Still needs testing.

4 weeks ago

#9 @imath
4 weeks ago

  • Keywords has-unit-tests added; needs-testing removed

Hi @andraganescu

Thanks a lot for the patch and for refreshing it.

  1. I advise you to use the --no-prefix option when building your patch so that people using SVN can apply it.
  2. I believe it's best to cast the comment_parent as an integer for the strict comparison as get_comment() is returning a string for the comment_parent property.
  3. I guess if we include the "in reply to" information for post authors, we should probably also include this information for moderators.

43805.3.diff is adding these 3 points and 4 unit tests. I've also tested the patch regularly with success.

Note: See TracTickets for help on using tickets.