akcjaod 2.2.0
get_sidebar
Opis — z kodu źródłowego
Fires before the sidebar template file is loaded.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$name | string | null | Name of the specific sidebar file to use. Null for the default sidebar. |
$args | array | Additional arguments passed to the sidebar template. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'get_sidebar', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'get_sidebar', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii