Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#14261 closed defect (bug) (fixed)

comment_text() needs to pass some IDs

Reported by: nacin's profile nacin Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version:
Component: Comments Keywords: gsoc has-patch
Focuses: Cc:


Bug: The comment_text() function doesn't pass the $comment_ID to get_comment_text().

Enhancement: Additionally, it'd be nice for the filters in both of these functions to be passed the comment ID.

Attachments (2)

14261(bug).diff (481 bytes) - added by wojtek.szkutnik 14 years ago.
14261.diff (775 bytes) - added by wojtek.szkutnik 14 years ago.

Download all attachments as: .zip

Change History (7)

#1 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords gsoc has-patch added

#2 follow-up: @simonwheatley
14 years ago

  • Cc simon@… added

N.B. You can get the comment ID from the $comment global.

#3 @simonwheatley
14 years ago

I've incorporated this proposed param into #14856, let me know if this is unhelpful and I'll refactor the patches on that ticket.

#4 in reply to: ↑ 2 @nacin
14 years ago

Replying to simonwheatley:

N.B. You can get the comment ID from the $comment global.

We'd need to here. If $comment_ID = 0, we only set $comment via get_comment(), but don't update $comment_ID. So we'll have to change $comment_ID to $comment->ID.

I like the patch in #14856 but I don't really see a problem with getting this in on its own.

#5 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15957]) Pass comment ID from comment_text to get_comment_text. Also add the comment object as context to the filter. fixes #14261

Note: See TracTickets for help on using tickets.