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
1091       * refer to the metadata object type (comment, post, term, or user) and the meta
1092       * key value, respectively.
1093       *
1094       * @since 3.3.0
1095       *
1096       * @param mixed  $meta_value      Meta value to sanitize.
1097       * @param string $meta_key        Meta key.
1098       * @param string $object_type     Object type.
1099       */
1100      return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
1101 }
1103 /**
1104  * Registers a meta key.
1105  *
1106  * It is recommended to register meta keys for a specific combination of object type and object subtype. If passing
1107  * an object subtype is omitted, the meta key will be registered for the entire object type, however it can be partly
1108  * overridden in case a more specific meta key of the same name exists for the same object type and a subtype.
1109  *