WP HOOKS
filtrod 2.6.0

img_caption_shortcode

Args 3Plik wp-includes/media.phpDokumentacja WP ↗

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

ParametrTypOpis
$outputstringThe caption output. Default empty.
$attrarrayAttributes of the caption shortcode.
$contentstringThe 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
}

Popularne w tej kategorii