WP_Roles::reinit
Устарела с версии 4.7.0. Больше не поддерживается и может быть удалена. Используйте WP_Roles::for_site().
Reinitializes the object.
Recreates the role objects. This is typically called only by switch_to_blog() after switching wpdb to a new site ID.
Метод класса: WP_Roles{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
global $wp_roles; $wp_roles->reinit();
Список изменений
| С версии 3.5.0 | Введена. |
| Устарела с 4.7.0 | Use WP_Roles::for_site() |
Код WP_Roles::reinit() WP Roles::reinit WP 7.1
public function reinit() {
_deprecated_function( __METHOD__, '4.7.0', 'WP_Roles::for_site()' );
$this->for_site();
}