[wp-trac] [WordPress Trac] #40012: Only add_metadata if no matching value

WordPress Trac noreply at wordpress.org
Thu Mar 2 02:58:16 UTC 2017


#40012: Only add_metadata if no matching value
--------------------------------+------------------------------
 Reporter:  johnjamesjacoby     |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:  2.9
 Severity:  normal              |  Resolution:
 Keywords:  2nd-opinion         |     Focuses:
--------------------------------+------------------------------

Comment (by johnjamesjacoby):

 Thinking about this more, there could be 4 types of uniqueness:

 * Unique `meta_key` to all objects
 * Unique `meta_key` to the `$object_id` (what `$unique` currently checks)
 * Unique `meta_key` and `meta_value` to all objects
 * Unique `meta_key` and `meta_value` the `$object_id` (what my patch adds)

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


More information about the wp-trac mailing list