akcjaod 1.5.0
switch_theme
Opis — z kodu źródłowego
Fires after the theme is switched.
See {@see 'after_switch_theme'}.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$new_name | string | Name of the new theme. |
$new_theme | \WP_Theme | WP_Theme instance of the new theme. |
$old_theme | \WP_Theme | WP_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
}
// 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