WP HOOKS
filtrod 4.9.0

can_add_user_to_blog

Args 4Plik wp-includes/ms-functions.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether a user should be added to a site.

Parametry

ParametrTypOpis
$retvaltrue | \WP_ErrorTrue if the user should be added to the site, error object otherwise.
$user_idintUser ID.
$rolestringUser role.
$blog_idintSite ID.

Wywołanie

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

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