WP HOOKS
akcjaod MU (3.0.0)

switch_blog

Args 3Plik wp-includes/ms-blogs.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires when the blog is switched.

Parametry

ParametrTypOpis
$new_blog_idintNew blog ID.
$prev_blog_idintPrevious blog ID.
$contextstringAdditional 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
}