[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:31:39 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 TimothyBlynJacobs):
You can take a look at `register_meta` it has a `single` flag which
indicates the opposite, but could be used for this purpose. I think you'd
also have to correlate it with the registered type.
There could still be backwards compatibility concerns if someone has a
`registeer_meta` key that is single => false, with an array value, and is
passing the value to `meta_input`. You would need to be careful that the
array doesn't get broken up into multiple rows, but is still stored as a
single row.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41949#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list