On this page
WP_User::for_blog( int $blog_id = '' )
This method has been deprecated. Use WP_User::for_site() instead.
Sets the site to operate on. Defaults to the current site.
Parameters
$blog_idint Optional-
Site ID, defaults to current site.
Default:
''
Source
File: wp-includes/class-wp-user.php. View all references
public function for_blog( $blog_id = '' ) {
_deprecated_function( __METHOD__, '4.9.0', 'WP_User::for_site()' );
$this->for_site( $blog_id );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_User::for_site() wp-includes/class-wp-user.php | Sets the site to operate on. Defaults to the current site. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Use WP_User::for_site() |
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user/for_blog