Opened 11 years ago
Closed 9 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 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Quick/Bulk Edit | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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 https://developer.wordpress.org/reference/functions/bulk_edit_posts/ lines 559 and 568/569
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.