filtrod 3.1.0
get_ancestors
Opis — z kodu źródłowego
Filters a given object's ancestors.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$ancestors | int[] | An array of IDs of object ancestors. |
$object_id | int | Object ID. |
$object_type | string | Type of object. |
$resource_type | string | Type of resource $object_type is. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_ancestors', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_ancestors', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii