#41396 closed defect (bug) (fixed)
set_post_format: inconsistency between edit_post and bulk_edit_posts
Reported by: | Chouby | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Post Formats | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
In edit_post()
, set_post_format()
is called before the post is saved. In bulk_edit_posts()
, it is called after.
This can cause trouble to the plugins expecting to have the right post format, when hooking to the action save_post
.
Attachments (2)
Change History (8)
#3
@
7 years ago
- Keywords commit added
Simply moving set_post_format()
call above wp_update_post()
is not enough, as wp_insert_post()
then overwrites the format with the old data from $post_data['tax_input']['post_format']
.
41396.2.diff adds unset( $post_data['tax_input']['post_format'] )
and a unit test.
Note: See
TracTickets for help on using
tickets.
Introduced in [18722].