WP HOOKS
akcjaod 1.5.0

switch_theme

Args 3Plik wp-includes/theme.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires after the theme is switched.

See {@see 'after_switch_theme'}.

Parametry

ParametrTypOpis
$new_namestringName of the new theme.
$new_theme\WP_ThemeWP_Theme instance of the new theme.
$old_theme\WP_ThemeWP_Theme instance of the old theme.

Wywołanie

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

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

Popularne w tej kategorii