WP_Users_List_Table::ajax_user_can()publicWP 3.1.0

Check the current user's permissions.

Метод класса: WP_Users_List_Table{}

No Hooks.

Return

true|false.

Usage

$WP_Users_List_Table = new WP_Users_List_Table();
$WP_Users_List_Table->ajax_user_can();

Changelog

Since 3.1.0 Introduced.

Код WP_Users_List_Table::ajax_user_can() WP 6.1.1

public function ajax_user_can() {
	if ( $this->is_site_users ) {
		return current_user_can( 'manage_sites' );
	} else {
		return current_user_can( 'list_users' );
	}
}