WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#14279 new defect (bug)

wp_new_comment ignores comment_date_gmt and comment_date

Reported by: johneckman Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Comments Keywords: dev-feedback has-patch
Focuses: Cc:

Description

wp_new_comment takes in a $comment array, but then ignores the comment_date and comment_date_gmt passed into it, instead replacing them with the current time.

It should only set them if the data passed in is empty or not a date/time.

Attachments (2)

14279.diff (896 bytes) - added by solarissmoke 3 years ago.
14279.2.diff (2.7 KB) - added by oso96_2000 5 months ago.
Refreshed patch with unit test

Download all attachments as: .zip

Change History (7)

comment:1 dd323 years ago

  • Keywords needs-patch easy added
  • Milestone changed from Awaiting Review to Future Release

solarissmoke3 years ago

comment:2 solarissmoke3 years ago

  • Keywords has-patch added; needs-patch easy removed

comment:3 ircbot5 months ago

This ticket was mentioned in IRC in #wordpress-dev by oso96_2000. View the logs.

oso96_20005 months ago

Refreshed patch with unit test

comment:4 oso96_20005 months ago

  • Keywords dev-feedback added; has-patch removed

Hey, sorry for taking too long to resolve this. Thanks for the patch @solarissmoke, I just refreshed it and added some unit tests.

comment:5 oso96_20005 months ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.