WP HOOKS
filtrdynamicznyod 3.3.0

sanitize_{$object_type}_meta_{$meta_key}

Args 3Plik wp-includes/meta.php

Opis — z kodu źródłowego

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 (blog, comment, post, term, or user) and the meta key value, 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.

Wywołanie

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

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