Last active
December 28, 2015 02:49
-
-
Save mbejda/7430764 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php add_role( $role, $display_name, $capabilities ); ?> | |
<?php | |
$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.'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment