filtrod 3.1.0
load_image_to_edit_attachmenturl
Opis — z kodu źródłowego
Filters the path to an attachment's URL when editing the image.
The filter is only evaluated if the file isn't stored locally and allow_url_fopen is enabled on the server.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$image_url | string | false | Current image URL. |
$attachment_id | int | 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). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'load_image_to_edit_attachmenturl', '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( 'load_image_to_edit_attachmenturl', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii