Hi there!
I have a tricky question for you, I know how WP is working with the default roles but for a project I need to set up three different new roles. So I tought well let's start from the function.php file.
And with the help of the action hook init I've been able to load a function that checks if inside my WP system are already present my new roles if it's not the case I'll set some default capabilities for each new role.
Until here everythings seems to work properly, but when I am going to register a new user and set it to a new role with the following code:
Instead to have all the capabilities applied to one of the roles all thet I get is:Code:wp_update_user( array ('ID' => $user_id, 'role' => $posted['your_role'] ) ) ;
nothing else... My new user does not have all the capabilities that he needs to have in order to use properly my new theme.Code:[wp_capabilities] => Array ( [centro] => 1 )
Anyone knows if there is something that I am missing? What is the purpose of create a role if it does not brings its own capabilities?
Thanks for the answers!


LinkBack URL
About LinkBacks
Reply With Quote