#46228 closed enhancement (fixed)
wp_insert_post_data should include $update
| Reported by: | nhadsall | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.0 |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch dev-feedback add-to-field-guide |
| Cc: | Focuses: |
Description
wp_insert_post() has a great filter: 'wp_insert_post_data', but it doesn't contain the status of $update (if the post is being updated or new). So, our options are 1. check again if this is an update (redundant) or 2. wait for the 'save_post' action and resave the post with changes (making redundant DB calls). So, it seems the best solution is 3. simply add $update as a parameter to wp_insert_post_data.
Attachments (1)
Change History (6)
#1
@
8 years ago
- Keywords has-patch dev-feedback added
Hi @nhadsall, Welcome to WordPress Trac! Thank you for your ticket.
+1 on your thought as it's great to add $update variable in filter.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch.