WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 4 weeks 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: 5.0 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch has-unit-tests
Focuses: Cc:

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 12 months ago.
41227.2.patch (2.2 KB) - added by JPry 4 weeks ago.

Download all attachments as: .zip

Change History (5)

@shamim51
12 months ago

#1 @shamim51
12 months ago

  • Keywords has-patch added

#2 @JPry
4 weeks 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
4 weeks ago

#3 @johnbillion
4 weeks ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to johnbillion
  • Status changed from new to reviewing
  • Version trunk deleted
Note: See TracTickets for help on using tickets.