[wp-trac] [WordPress Trac] #41949: Allow multiple values for the same meta key to be passed to `wp_insert_post()`

WordPress Trac noreply at wordpress.org
Fri Jun 26 18:12:05 UTC 2020


#41949: Allow multiple values for the same meta key to be passed to
`wp_insert_post()`
-------------------------------+------------------------------
 Reporter:  desrosj            |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  4.4
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+------------------------------

Comment (by stuffradio):

 Replying to [comment:6 TimothyBlynJacobs]:
 > How would you differentiate between an array of meta values, or one meta
 value that should be an array?

 What if I just replaced the `update_post_meta` with `add_post_meta`?
 Because this is wp_insert_post, why would I be updating a post meta when
 the meta key shouldn't exist yet?

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


More information about the wp-trac mailing list