WordPress как на ладони
WordCamp Saint Petersburg 2018 wordpress jino
фильтр не описан

sanitize_(object_type)_meta_(meta_key) хук-фильтр . WP 3.3.0

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

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

Использование

add_filter( 'sanitize_(object_type)_meta_(meta_key)', 'filter_function_name_8488', 10, 3 );
function filter_function_name_8488( $meta_value, $meta_key, $object_type ){
	// filter...

	return $meta_value;
}
$meta_value(смешанный)
Meta value to sanitize.
$meta_key(строка)
Meta key.
$object_type(строка)
Object type.

Где используется хук

Код хука

Фрагмент из: wp-includes/meta.php VER 4.9.6
...
 */
function sanitize_meta( $meta_key, $meta_value, $object_type ) {
	/**
	 * Filters the sanitization of a specific meta key of a specific meta type.
	 *
	 * The dynamic portions of the hook name, `$meta_type`, and `$meta_key`,
	 * refer to the metadata object type (comment, post, or user) and the meta
	 * key value, respectively.
	 *
	 * @since 3.3.0
	 *
	 * @param mixed  $meta_value      Meta value to sanitize.
	 * @param string $meta_key        Meta key.
	 * @param string $object_type     Object type.
	 */
	return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
}

/**
 * Registers a meta key.
 *
 * @since 3.3.0
 * @since 4.6.0 {@link https://core.trac.wordpress.org/ticket/35658 Modified
 *              to support an array of data to attach to registered meta keys}. Previous arguments for
 *              `$sanitize_callback` and `$auth_callback` have been folded into this array.
 *
 * @param string $object_type    Type of object this meta is registered to.
 * @param string $meta_key       Meta key to register.
 * @param array  $args {
 *     Data used to describe the meta key when registered.
 *
...