WordPress at Your Fingertips
function is not described

WP_User::for_blog() public WP 3.0.0

Deprecated from version 4.9.0. It is no longer supported and can be removed in future releases. Use WP_User::for_site() instead.

Set the site to operate on. Defaults to the current site.

{} It's a method of the class: WP_User{}

No Hooks.


null. Nothing.


$WP_User = new WP_User();
$WP_User->for_blog( $blog_id );
Site ID.
Default: current site


Since 3.0.0 Introduced.
Deprecated Since 4.9.0 Use WP_User::for_site()

Code of WP_User::for_blog() WP 5.8.1

public function for_blog( $blog_id = '' ) {
	_deprecated_function( __METHOD__, '4.9.0', 'WP_User::for_site()' );

	$this->for_site( $blog_id );