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

WP_Roles::reinit() WordPress Method

The WP_Roles::reinit() method is used to reset the roles and capabilities of a user. This can be useful if you need to change the capabilities of a user, or if you need to create a new role for a user.

WP_Roles::reinit() #

Reinitialize the object


Description

Recreates the role objects. This is typically called only by switch_to_blog() after switching wpdb to a new site ID.


Top ↑

Source

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

	public function reinit() {
		_deprecated_function( __METHOD__, '4.7.0', 'WP_Roles::for_site()' );

		$this->for_site();
	}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Use WP_Roles::for_site()
3.5.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.