filtrdynamicznyod 3.4.0
current_theme_supports-{$feature}
Args 3Plik wp-includes/theme.php
Opis — z kodu źródłowego
Filters whether the active theme supports a specific feature.
The dynamic portion of the hook name, $feature, refers to the specific theme feature. See add_theme_support() for the list of possible values.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$supports | bool | Whether the active theme supports the given feature. Default true. |
$args | array | Array of arguments for the feature. |
$feature | string | The theme feature. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'current_theme_supports-{$feature}', '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( 'current_theme_supports-{$feature}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii