Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2963 closed defect (bug) (fixed)

Support Forums: Approving a post should not reset its date

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Support Forums Keywords:


Approving a post from Spam or Pending queue resets the post date, which should not happen.

Approving a previously spammed or unapproved post does not change its date.

Change History (3)

#1 @SergeyBiryukov
7 years ago

Spam posts appear to be unaffected, only pending posts are. The issue is that wp_update_post() overwrites the date for pending posts, unless the post already has a non-empty post_date_gmt.

#2 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 5685:

Support Forums: Keep the original post date when approving a pending post.

Set a non-empty post_date_gmt for pending posts to prevent wp_update_post() from overwriting the post date on approving.

Fixes #2963.

#3 @SergeyBiryukov
7 years ago

In 5690:

Support Forums: Add bbPress ticket reference to Hooks::set_post_date_gmt_for_pending_posts().

See #2963., #bbpress3133.

Note: See TracTickets for help on using tickets.