WP_Roles::__construct() public WP 2.0.0
Constructor
{} Это метод класса: WP_Roles{}
Хуков нет.
Возвращает
null
. Null. Ничего.
Использование
global $wp_roles; $wp_roles->__construct( $site_id );
- $site_id(число)
- Site ID to initialize roles for.
По умолчанию: current site
Заметки
- Global. Массив. $wp_user_roles Used to set the 'roles' property value.
Список изменений
С версии 2.0.0 | Введена. |
С версии 4.9.0 | The $site_id argument was added. |
Код WP_Roles::__construct() WP Roles:: construct WP 5.7
public function __construct( $site_id = null ) {
global $wp_user_roles;
$this->use_db = empty( $wp_user_roles );
$this->for_site( $site_id );
}