WP HOOKS
akcjaod 2.2.0

get_sidebar

Args 2Plik wp-includes/general-template.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires before the sidebar template file is loaded.

Parametry

ParametrTypOpis
$namestring | nullName of the specific sidebar file to use. Null for the default sidebar.
$argsarrayAdditional 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
}

Popularne w tej kategorii