WordPress at a glance
function is not described

WP_Roles::reinit() public WP 3.5.0

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

Reinitialize the object

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

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

No Hooks.

Return

null. Nothing.

Usage

global $wp_roles;
$wp_roles->reinit();

Changelog

Since 3.5.0 Introduced.
Deprecated Since 4.7.0 Use WP_Roles::for_site()

Code of WP_Roles::reinit() WP 5.7.2

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

	$this->for_site();
}