akcjaod MU (3.0.0)
switch_blog
Opis — z kodu źródłowego
Fires when the blog is switched.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$new_blog_id | int | New blog ID. |
$prev_blog_id | int | Previous blog ID. |
$context | string | Additional context. Accepts 'switch' when called from switch_to_blog() or 'restore' when called from restore_current_blog(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'switch_blog', '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_blog', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}