Make WordPress Core

Opened 6 weeks ago

Last modified 7 minutes ago

#52322 new enhancement

Add comment / comment id param to get_comment_time

Reported by: spacedmonkey Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Comments Keywords: good-first-bug has-patch
Focuses: Cc:


Bring get_comment_time inline with get_comment_date and add a comment / comment id param to pass comment id into the function.

Attachments (2)

52322.diff (1.0 KB) - added by travisaxton 28 hours ago.
52322.2.diff (1.5 KB) - added by travisaxton 6 minutes ago.
Version 2.0

Download all attachments as: .zip

Change History (5)

28 hours ago

#1 @travisaxton
28 hours ago

  • Keywords has-patch added; needs-patch removed

I've submitted a possible solution for the 'get_comment_time' function. This is my first submission for WordPress Core so I apologize if I have made any mistakes with the Trac workflow.

#2 @SergeyBiryukov
19 hours ago

Thanks for the patch! Some notes:

  • The new parameter should be added at the end. Adding it after $format matches get_comment_date(), but is not feasible in practice, as it would break backward compatibility.
  • The DocBlock should be aligned per the documentation standards and would also need a @since note.
  • comment_time() would probably need a similar change for consistency.

#3 @travisaxton
7 minutes ago

Thanks for the guidance and the feedback!

I updated 'get_comment_time' to reflect the changes you mentioned. Still trying to figure out the best way to change 'comment_time' for consistency. Attaching an updated patch file to make sure I am on the right track.

Thanks very much for your patience in helping me navigate the coding standards.

6 minutes ago

Version 2.0

Note: See TracTickets for help on using tickets.