On the WordPress codex Add Role page it says how to add a role, but I can not figure out how to do it, or that is inherits. Specially the comment //Use false to explicitly deny
.
What does that mean?
Does that mean if i do not say false to all the capability they can still do is if they guess the rigth URL?
Can somebody tell me the difference between true and false in wp role perspective, and how I should use it?
I am trying to make a user which can only edit pages. Nothing else.
http://codex.wordpress.org/Function_Reference/add_role
$result = add_role('basic_contributor', 'Basic Contributor', array(
'read' => true, // True allows that capability
'edit_posts' => true,
'delete_posts' => false, // Use false to explicitly deny
));
if (null !== $result) {
echo 'Yay! New role created!';
} else {
echo 'Oh... the basic_contributor role already exists.';
}