[wp-trac] [WordPress Trac] #35797: delete_metadata should only delete metadata cache entries with the value specified in $meta_value arg

WordPress Trac noreply at wordpress.org
Thu Feb 11 17:39:30 UTC 2016


#35797: delete_metadata should only delete metadata cache entries with the value
specified in $meta_value arg
--------------------------------+------------------------------------------
 Reporter:  rahal.aboulfeth     |       Owner:  boonebgorges
     Type:  defect (bug)        |      Status:  assigned
 Priority:  normal              |   Milestone:  4.5
Component:  Options, Meta APIs  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  administration, performance
--------------------------------+------------------------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => assigned
 * milestone:  Awaiting Review => 4.5


Comment:

 @rahal.aboulfeth Thanks for the ticket and for the patch.

 Replying to [comment:3 Clorith]:
 > I'm not sure your patch applies here, as it fires on the conditional
 that you've supplied `delete_metadata` with the $delete_all as true, and
 you are then meant to delete all entries with that key regardless of the
 meta_value.
 >
 > I suspect it would probably make more sense to look into the logic of
 `wp_delete_attachment` here

 I believe this is incorrect. The "all" in `$delete_all` refers to "all
 objects" rather than "all meta for a given object".

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


More information about the wp-trac mailing list