Warning: This method has been deprecated. Use WP_User::for_site() instead.

WP_User::for_blog() WordPress Method

The WP_User::for_blog() method is used to get the user data for a user in the specified blog. This is useful if you need to get the user data for a user who is not the current user.

WP_User::for_blog( int $blog_id = '' ) #

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


Parameters

$blog_id

(int)(Optional) Site ID, defaults to current site.

Default value: ''


Top ↑

Source

File: wp-includes/class-wp-user.php

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

		$this->for_site( $blog_id );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.9.0Use WP_User::for_site()
3.0.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.