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
| Parametr | Typ | Opis |
|---|---|---|
$meta_value | mixed | Metadata value to sanitize. |
$meta_key | string | Metadata key. |
$object_type | string | Type 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
}
// 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
}