[wp-trac] [WordPress Trac] #34764: get_post_format does not work when using in a save_post callback and using Bulk Edit

WordPress Trac noreply at wordpress.org
Sun Nov 22 16:12:00 UTC 2015


#34764: get_post_format does not work when using in a save_post callback and using
Bulk Edit
-----------------------------+-----------------------------
 Reporter:  twarrior3dc      |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Quick/Bulk Edit  |    Version:  4.3.1
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34764>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list