WP_Roles::reinit()publicWP 3.5.0

Устарела с версии 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 6.5.2

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

	$this->for_site();
}