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