filtrod 4.1.0
image_add_caption_text
Opis — z kodu źródłowego
Filters the caption text.
Note: If the caption text is empty, the caption shortcode will not be appended to the image HTML when inserted into the editor. Passing an empty value also prevents the {@see 'image_add_caption_shortcode'} Filters from being evaluated at the end of image_add_caption().
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$caption | string | The original caption text. |
$id | int | The attachment ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_add_caption_text', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'image_add_caption_text', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii