Opened 17 years ago
Closed 17 years ago
#9009 closed defect (bug) (fixed)
delete_post_meta_by_key() fix
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.8 | Priority: | normal |
| Severity: | major | Version: | 2.7 |
| Component: | Optimization | Keywords: | has-patch tested commit |
| Focuses: | Cc: |
Description
patch for the todo item is attached
Attachments (3)
Change History (12)
#2
@
17 years ago
Second enhanced version lets one use LIKE, NOT LIKE, REGEXP AND NOT REGEXP, as necessary.
#4
@
17 years ago
enhanced and enhanced2 diffs are bad ideas on second though. the first patch is the correct one to use.
Note: See
TracTickets for help on using
tickets.
The second patch is a suggested enhancement. It replaces the = operator with a LIKE operator, allowing to mass-delete post meta, like:
delete_post_meta_by_key('_plugin_cache_%')I needed this a couple of time in my own plugins and ended up using SQL to achieve it. Having it in the wp core would be a plus.