WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 9 months ago

#41227 reviewing defect (bug)

Ability to pass post_modified and post_modified_gmt to wp_insert_post

Reported by: shamim51 Owned by: johnbillion
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch has-unit-tests 2nd-opinion
Focuses: Cc:
PR Number:

Description

It is hard-coded that post_modified and post_modified_gmt will be current time or post_date. But sometimes it can be needed to have custom date passed to wp_insert_post/wp_update_post.

Attachments (2)

41227.patch (1.3 KB) - added by shamim51 2 years ago.
41227.2.patch (2.2 KB) - added by JPry 17 months ago.

Download all attachments as: .zip

Change History (7)

@shamim51
2 years ago

#1 @shamim51
2 years ago

  • Keywords has-patch added

#2 @JPry
17 months ago

  • Keywords has-unit-tests added
  • Type changed from enhancement to defect (bug)
  • Version set to trunk

I believe this issue should actually be classified as a bug. According to the docblock for wp_insert_post(), the values for post_modified and post_modified_gmt should already be accepted.

I'm uploading a refreshed patch that includes unit tests.

@JPry
17 months ago

#3 @johnbillion
17 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to johnbillion
  • Status changed from new to reviewing
  • Version trunk deleted

#4 @johnbillion
12 months ago

  • Milestone changed from 5.0 to 5.1

#5 @pento
9 months ago

  • Keywords 2nd-opinion added
  • Milestone changed from 5.1 to Future Release

I suspect there will be all sorts of weird side effects to this. This change needs very careful consideration before merging.

Note: See TracTickets for help on using tickets.