Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#34764 closed defect (bug) (duplicate)

get_post_format does not work when using in a save_post callback and using Bulk Edit

Reported by: twarrior3dc's profile twarrior3dc Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Quick/Bulk Edit Keywords:
Focuses: Cc:


It seems that when using Bulk Edit, post_format is not updated until after wp_update_post (and in turn any save_post callbacks) therefore making it impossible to reliably use get_post_format in a save_post callback as the old post format is returned when using Bulk Edit while the new post format is returned when editing a single post. While it seems that this might be by design, it does run counter to the logic that save_post is always executed after the post is updated. If this is truly necessary by design I think the save_post Codex page should be at least updated to reference this as an exception. See lines 559 and 568/569

Change History (2)

#1 @twarrior3dc
8 years ago

  • Version 4.3.1 deleted

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @twarrior3dc, welcome to WordPress Trac!

Thanks for the report, sorry it took so long for someone to get back to you.

This was recently fixed in another ticket: #41396.

Note: See TracTickets for help on using tickets.