Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: sanitize_{$object_type}_meta_{$meta_key}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1083       * refer to the metadata object type (comment, post, term, or user) and the meta
1084       * key value, respectively.
1085       *
1086       * @since 3.3.0
1087       *
1088       * @param mixed  $meta_value      Meta value to sanitize.
1089       * @param string $meta_key        Meta key.
1090       * @param string $object_type     Object type.
1091       */
1092      return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
1093 }
1094
1095 /**
1096  * Registers a meta key.
1097  *
1098  * It is recommended to register meta keys for a specific combination of object type and object subtype. If passing
1099  * an object subtype is omitted, the meta key will be registered for the entire object type, however it can be partly
1100  * overridden in case a more specific meta key of the same name exists for the same object type and a subtype.
1101  *