#12203 closed enhancement (wontfix)
Delete options with a wildcard
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
It would be nice to be able to say delete_option('foo_*')
and WordPress respect that as a wildcard.
Just saying. :)
Attachments (2)
Change History (5)
#1
@
14 years ago
The second patch is better but then it kind of highlights why this doesn't need to be in core. Aren't we encouraging option proliferation by giving plugin authors an API to remove in bulk all of their options that have a prefix? For the most part they should be using a single option (or two, if not all should be autoloaded).
I see a purpose here if you want to clear all transients, that's about it though. Can you share a use case?
#2
@
14 years ago
- Resolution set to wontfix
- Status changed from new to closed
Well, my use case is a database-based cache for a plugin. Using a single option or two, while preferred, is not conducive with the way the API I'm using is written (unfortunately). I see your point though and happy to close. I'll just take this bit and add it to my plugin.
Thanks
To avoid risk of someone pulling the proverbial rm -rf /, try patch 2 on for size.