Opened 15 years ago
Closed 15 years ago
#9084 closed defect (bug) (fixed)
Problem when wp_insert_post_data filter changes post status
Reported by: | sirzooro | Owned by: | Denis-de-Bernardy |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | major | Version: | 2.7 |
Component: | General | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
wp_insert_post() calls wp_insert_post_data filter and then continues without updating local variables. This can cause problems when filter will change them. I found this issue after I created plugin which changes posts status back to Draft if some conditions are not met. After this status change transition_post_status action is invoked with incorrect new state parameter. Because of this WP Status Notifier plugin incorrectly sends emails with notifications.
Attachments (2)
Change History (8)
Note: See
TracTickets for help on using
tickets.
new patch prevents the needless and potentially overwriting of too much data