WordPress at Your Fingertips
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.


null. Nothing.


global $wp_roles;


Deprecated Since 4.7.0 Use WP_Roles::for_site()

Code of WP_Roles::reinit() WP 5.8.3

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