WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 months ago

#23634 assigned enhancement

New hook for adding content after each comment

Reported by: lancewillett Owned by: chriscct7
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

Similar to #18561 (which is for a new "after post" hook) add a hook that fires after each comment output with wp_list_comments.

Attachments (3)

23634.diff (517 bytes) - added by codeclarified 3 years ago.
23634.2.diff (635 bytes) - added by MikeHansenMe 7 months ago.
23634.3.diff (711 bytes) - added by MikeHansenMe 7 months ago.
with Docs

Download all attachments as: .zip

Change History (20)

@codeclarified
3 years ago

#1 @codeclarified
3 years ago

  • Cc codeclarified added
  • Keywords has-patch added; needs-patch removed

Added a hook to class-wp-walker.php - due to the callback functions on comments this was the only reliable location I could find to add such a hook without worrying about it being dropped due to a custom callback, and still keeping a nested reply from duplicating the content after the levels start closing

#2 @mordauk
3 years ago

  • Cc pippin@… added

#3 @sunnyratilal
3 years ago

  • Cc sunnyratilal5@… added

#4 @DrewAPicture
3 years ago

  • Keywords punt added

#5 @MikeHansenMe
3 years ago

  • Cc mdhansen@… added

#6 @ocean90
3 years ago

  • Milestone changed from 3.6 to Future Release

#7 @SergeyBiryukov
2 years ago

  • Keywords punt removed

#8 @chriscct7
7 months ago

  • Keywords needs-refresh added
  • Owner set to chriscct7
  • Status changed from new to assigned

#9 @MikeHansenMe
7 months ago

  • Keywords needs-refresh removed

#10 @chriscct7
7 months ago

  • Milestone changed from Future Release to 4.4
  • Status changed from assigned to accepted

Thanks @mikehansenme

#11 @DrewAPicture
7 months ago

  • Keywords needs-docs added

@MikeHansenMe We'll need a hook doc to go with the action proposed in 23634.2.diff.

#12 @MikeHansenMe
7 months ago

Completely forgot about that.. my bad. I will get it added. Thanks @DrewAPicture.

@MikeHansenMe
7 months ago

with Docs

#13 @MikeHansenMe
7 months ago

  • Keywords needs-docs removed

#14 @DrewAPicture
7 months ago

  • Owner changed from chriscct7 to DrewAPicture

Thanks @MikeHansenMe, I'll take a look.

#15 @DrewAPicture
7 months ago

I'm not sure about the placement of the hook. In comment:1 @codeclarified mentioned that it was the only reliable place to put it, and if that's the case, then this really doesn't fire after a comment has been displayed.

#16 @DrewAPicture
7 months ago

  • Owner changed from DrewAPicture to chriscct7
  • Status changed from accepted to assigned

#17 @wonderboymusic
6 months ago

  • Milestone changed from 4.4 to Future Release
Note: See TracTickets for help on using tickets.