wppaste
WordPress

apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", mixed $meta_value, string $meta_key, string $object_type )

Since
3.3.0
Filters the sanitization of a specific meta key of a specific meta type.

Description

The dynamic portions of the hook name, $meta_type, and $meta_key, refer to the metadata object type (blog, comment, post, term, or user) and the meta key value, respectively.

Compatibility

WordPress
since 3.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$meta_valuemixed
Metadata value to sanitize.
$meta_keystring
Metadata key.
$object_typestring
Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.

Where this hook fires · 1

  • wp-includes/meta.php:1377sanitize_meta()

Source code

	 *	 * @param mixed  $meta_value  Metadata value to sanitize.	 * @param string $meta_key    Metadata key.	 * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',	 *                            'user', or any other object type with an associated meta table.	 */	return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );} /** * Registers a meta key. * * It is recommended to register meta keys for a specific combination of object type and object subtype. If passing

Changelog

Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.