[wp-trac] [WordPress Trac] #56700: wp_update_post function not support meta update

WordPress Trac noreply at wordpress.org
Fri Sep 30 15:31:59 UTC 2022


#56700: wp_update_post function not support meta update
-------------------------------+------------------------------
 Reporter:  borisolhor         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by pbiron):

 @borisolhor Thanx for the ticket and welcome to Trac!

 If you look at [https://github.com/WordPress/wordpress-
 develop/blob/6.0.2/src/wp-includes/post.php#L4775] you'll see that
 `wp_update_post()` is basically just a small wrapper around
 `wp_insert_post()`.  So, the `$postarr['meta_input']` values passed to it
 will be updated by the code you referenced within `wp_insert_post()`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56700#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list