filtrod 2.5.0
post_gallery
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
| Parametr | Typ | Opis |
|---|---|---|
$output | string | The gallery output. Default empty. |
$attr | array | Attributes of the gallery shortcode. |
$instance | int | Unique 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
}
// 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