WP HOOKS
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

ParametrTypOpis
$supportsboolWhether the active theme supports the given feature. Default true.
$argsarrayArray of arguments for the feature.
$featurestringThe 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
}

Popularne w tej kategorii