filtrod 2.5.0
image_send_to_editor
Opis — z kodu źródłowego
Filters the image HTML markup to send to the editor when inserting an image.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$html | string | The image HTML markup to send. |
$id | int | The attachment ID. |
$caption | string | The image caption. |
$title | string | The image title. |
$align | string | The image alignment. |
$url | string | The image source URL. |
$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). |
$alt | string | The image alternative, or alt, text. |
$rel | string | The image rel attribute. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_send_to_editor', 'twoja_funkcja', 10, 9 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6, $param_7, $param_8, $param_9) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_send_to_editor', 'twoja_funkcja', 10, 9 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5, $param_6, $param_7, $param_8, $param_9) {
// Twój kod
}Popularne w tej kategorii