filtrod 2.6.0
img_caption_shortcode
Opis — z kodu źródłowego
Filters the default caption shortcode output.
If the filtered output isn't empty, it will be used instead of generating the default caption template.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$output | string | The caption output. Default empty. |
$attr | array | Attributes of the caption shortcode. |
$content | string | The image element, possibly wrapped in a hyperlink. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'img_caption_shortcode', '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( 'img_caption_shortcode', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii