[wp-trac] [WordPress Trac] #46228: wp_insert_post_data should include $update

WordPress Trac noreply at wordpress.org
Sun Feb 10 20:50:16 UTC 2019


#46228: wp_insert_post_data should include $update
-------------------------------+-----------------------------
 Reporter:  nhadsall           |      Owner:  (none)
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 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.

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


More information about the wp-trac mailing list