filtrod 3.6.0
get_attached_media_args
Opis — z kodu źródłowego
Filters arguments used to retrieve media attached to the given post.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$args | array | Post query arguments. |
$type | string | Mime type of the desired media. |
$post | \WP_Post | Post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_attached_media_args', '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( 'get_attached_media_args', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii