akcjaod 3.9.0
dynamic_sidebar_before
Opis — z kodu źródłowego
Fires before widgets are rendered in a dynamic sidebar.
Note: The action also fires for empty sidebars, and on both the front end and back end, including the Inactive Widgets sidebar on the Widgets screen.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$index | int | string | Index, name, or ID of the dynamic sidebar. |
$has_widgets | bool | Whether the sidebar is populated with widgets. Default true. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'dynamic_sidebar_before', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'dynamic_sidebar_before', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii