remove_role( string $role )

Removes a role, if it exists.

Parameters

$rolestringrequired
Role name.

Source

function remove_role( $role ) {
	wp_roles()->remove_role( $role );
}

Changelog

VersionDescription
2.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.