[wp-trac] [WordPress Trac] #37349: Allow sanitize_meta() to filter the meta_value regardless of meta_key

WordPress Trac noreply at wordpress.org
Tue Jul 12 23:15:51 UTC 2016


#37349: Allow sanitize_meta() to filter the meta_value regardless of meta_key
--------------------------------+-----------------------------
 Reporter:  mattkeys            |      Owner:
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  4.5.3
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 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".

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37349>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list