wp_revoke_user()WP 2.1.0

Remove all capabilities from user.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wp_revoke_user( $id );
$id(int) (обязательный)
User ID.

Список изменений

С версии 2.1.0 Введена.

Код wp_revoke_user() WP 6.5.2

function wp_revoke_user( $id ) {
	$id = (int) $id;

	$user = new WP_User( $id );
	$user->remove_all_caps();
}