WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 14 months ago

#15309 new enhancement

Updating Attachments will always set post_modified[_gmt] to the post_date[_gmt]

Reported by: shawnparker Owned by:
Priority: normal Milestone: Future Release
Component: Media Version:
Severity: normal Keywords: has-patch
Cc: shawnparker, wordpress@…

Description

When updating an attachment the post_modified and post_modified_gmt are always set to post_date and post_date_gmt respectively.

Is there a specific reason for this or can we allow attachments to properly set a modified time?

Attached is a proposed patch (which just copies code directly from wp_insert_post).

Attachments (1)

att-mod-time-patch.diff (684 bytes) - added by shawnparker 3 years ago.
mod for allowing updated attachments to update the post_modified time

Download all attachments as: .zip

Change History (5)

shawnparker3 years ago

mod for allowing updated attachments to update the post_modified time

comment:1 nacin2 years ago

  • Keywords has-patch added; attachment update post_date removed
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

comment:2 christopherross14 months ago

Nacin,

Is there anyway this can be pushed into the next release for WordPress.com? We have a VIP project that requires sorting by media modification date and this looks like the best way to accomplish it. If there's anyway to get it in there, it would be a huge benefit.

Chris

comment:3 danielbachhuber14 months ago

  • Cc wordpress@… added

comment:4 dd3214 months ago

Is there anyway this can be pushed into the next release for WordPress.com? We have a VIP project that requires sorting by media modification date and this looks like the best way to accomplish it.

WordPress.org and WordPress.com are separate entities, WordPress.com can choose to add this patch to their codebase without anything happening on the .org side, however this isn't the place to discuss that, I'd suggest you get in touch with the VIP team and work out a solution in conjunction with them.

Note: See TracTickets for help on using tickets.