filtrod 4.9.0
can_add_user_to_blog
Opis — z kodu źródłowego
Filters whether a user should be added to a site.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$retval | true | \WP_Error | True if the user should be added to the site, error object otherwise. |
$user_id | int | User ID. |
$role | string | User role. |
$blog_id | int | Site 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
}
// 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
}