filtrod 3.9.0
dynamic_sidebar_has_widgets
Opis — z kodu źródłowego
Filters whether a sidebar has widgets.
Note: The filter is also evaluated 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 |
|---|---|---|
$did_one | bool | Whether at least one widget was rendered in the sidebar. Default false. |
$index | int | string | Index, name, or ID of the dynamic sidebar. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'dynamic_sidebar_has_widgets', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'dynamic_sidebar_has_widgets', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii