Make WordPress Core

Opened 22 months ago

Last modified 21 months ago

#56752 new defect (bug)

Add get_post_metadata filters by $meta_key

Reported by: galbaras's profile galbaras Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords:
Focuses: Cc:


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.

Change History (1)

#1 @desrosj
21 months ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.