Opened 10 years ago
Last modified 7 years ago
#37349 new enhancement
Allow sanitize_meta() to filter the meta_value regardless of meta_key
| Reported by: | mattkeys | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Options, Meta APIs | Version: | 4.5.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
I have created a couple of custom DB tables to handle storing a custom data type, and the meta for that data type. I modeled my meta table off of the WP postmeta/usermeta/etc standards so that I can use get_metadata and update_metadata functions and leverage all of their abilities.
Part of the update_metadata function is a call to sanitize_meta which lets you add filters in to sanitize the data in the format of: "sanitize_{$meta_type}_meta_{$meta_key}".
For the meta that I will be storing, I would like to apply a filter to ALL meta for my $meta_type, in the format of: "sanitize_{$meta_type}_meta".
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Adding two new filters to sanitize_meta to allow for filtering of all meta values regardless of meta key