Find out more latest movies news with us.

Find out more latest movies news with us.
Find out more latest movies news with us.

Thursday 7 December 2017

Programmatically Set the WordPress User Role

you can use add role hook of wordpress to add new role:

$user = new WP_User( $user_id );
$user->add_cap( $staudent);
$user->remove_cap( 'professors');

No comments:

Post a Comment

Most Viewable Posts

Reipe For Chicken

 Hello Friends, We are here to let you about the recipe for chicken. In your busy daily life, you need a guide to cook recipes that you can ...