WP HOOKS
filtrdynamicznyod 4.9.8

sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype}

Args 4Plik wp-includes/meta.php

Opis — z kodu źródłowego

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

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

Parametry

ParametrTypOpis
$meta_valuemixedMetadata value to sanitize.
$meta_keystringMetadata key.
$object_typestringType of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
$object_subtypestringObject subtype.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype}', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}