remove_user_role WordPress Action Hook

The remove_user_role hook is used to remove a user role from a user.

do_action( 'remove_user_role', int $user_id, string $role ) #

Fires immediately after a role as been removed from a user.


Parameters

$user_id

(int)The user ID.

$role

(string)The removed role.


Top ↑

Source

File: wp-includes/class-wp-user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.