can_add_user_to_blog WordPress Filter Hook

The can_add_user_to_blog hook is used to check if a user can be added to a blog. This hook is typically used in a multisite installation.

apply_filters( 'can_add_user_to_blog', true|WP_Error $retval, int $user_id, string $role, int $blog_id ) #

Filters whether a user should be added to a site.


Parameters

$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.


Top ↑

Source

File: wp-includes/ms-functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More