Opened 3 years ago
Last modified 3 years ago
#56752 new defect (bug)
Add get_post_metadata filters by $meta_key
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Options, Meta APIs | Keywords: | |
| Focuses: | Cc: |
Description
get_metadata_raw() applies get_{$meta_type}_metadata filters, which means that when trying to filter a single meta key, this function will be executed for EVERY meta key and require a condition that checks for the correct meta key to filter.
It would be a great idea to have get_{$meta_key}_metadata filters. Since $meta_key is some generic string, though, it cannot be used directly, and must be adapted first to suit a PHP function name by replacing any non-alphanumeric character with an underscore.
Note: See
TracTickets for help on using
tickets.