WP HOOKS
akcjaod 4.7.0

switch_locale

Args 2Plik wp-includes/class-wp-locale-switcher.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires when the locale is switched.

Parametry

ParametrTypOpis
$localestringThe new locale.
$user_idfalse | intUser ID for context if available.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'switch_locale', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii