WP HOOKS
filtrod 5.1.0

wp_initialize_site_args

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

Opis — z kodu źródłowego

Filters the arguments for initializing a site.

Parametry

ParametrTypOpis
$argsarrayArguments to modify the initialization behavior.
$site\WP_SiteSite that is being initialized.
$network\WP_NetworkNetwork that the site belongs to.

Wywołanie

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

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