WP_Roles::reinit
Deprecated since 4.7.0. It is no longer supported and may be removed in future releases. Use WP_Roles::for_site() instead.
Reinitializes the object.
Recreates the role objects. This is typically called only by switch_to_blog() after switching wpdb to a new site ID.
Method of the class: WP_Roles{}
No Hooks.
Returns
null. Nothing (null).
Usage
global $wp_roles; $wp_roles->reinit();
Changelog
| Since 3.5.0 | Introduced. |
| Deprecated since 4.7.0 | Use WP_Roles::for_site() |
WP_Roles::reinit() WP Roles::reinit code WP 6.9.1
public function reinit() {
_deprecated_function( __METHOD__, '4.7.0', 'WP_Roles::for_site()' );
$this->for_site();
}