filtrod 4.3.0
wp_get_attachment_image_src
Opis — z kodu źródłowego
Filters the attachment image source result.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$image | array | false | { Array of image data, or boolean false if no image is available. @type string $0 Image source URL. @type int $1 Image width in pixels. @type int $2 Image height in pixels. @type bool $3 Whether the image is a resized image. } |
$attachment_id | int | Image attachment ID. |
$size | string | int[] | Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order). |
$icon | bool | Whether the image should be treated as an icon. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_get_attachment_image_src', '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( 'wp_get_attachment_image_src', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii