WP HOOKS
filtrod 2.5.0

post_gallery

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

Opis — z kodu źródłowego

Filters the default gallery shortcode output.

If the filtered output isn't empty, it will be used instead of generating the default gallery template.

Parametry

ParametrTypOpis
$outputstringThe gallery output. Default empty.
$attrarrayAttributes of the gallery shortcode.
$instanceintUnique numeric ID of this gallery shortcode instance.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'post_gallery', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii