且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在wordpress中为用户分配多个角色?

更新时间:2023-02-26 07:46:52

为了完整性,这可能的!

For completeness, this is possible!

 $theUser = new WP_User($userId);
 $theUser->add_role( $role );