filtrdynamicznyod 4.9.8
get_object_subtype_{$object_type}
Args 2Plik wp-includes/meta.php
Opis — z kodu źródłowego
Filters the object subtype identifier.
The dynamic portion of the hook name, $object_type, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table).
Possible hook names include:
get_object_subtype_blogget_object_subtype_postget_object_subtype_commentget_object_subtype_termget_object_subtype_user
Hook dynamiczny — możliwe nazwy
get_object_subtype_blogget_object_subtype_commentget_object_subtype_postget_object_subtype_termget_object_subtype_userParametry
| Parametr | Typ | Opis |
|---|---|---|
$object_subtype | string | Object subtype or empty string to override. |
$object_id | int | ID of the object to get the subtype for. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_object_subtype_{$object_type}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_object_subtype_{$object_type}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}