Skip to content

Instantly share code, notes, and snippets.

@mariokerkhof
Last active February 1, 2016 09:12
Show Gist options
  • Save mariokerkhof/543bc000b047fb2ed878 to your computer and use it in GitHub Desktop.
Save mariokerkhof/543bc000b047fb2ed878 to your computer and use it in GitHub Desktop.
Add User Role
// Add role (voer dit eenmalig uit)
// Voeg coordinator toe
$result = add_role(
'coordinator',
__( 'Coördinator' ),
array(
'read' => true,
'edit_posts' => true,
'delete_posts' => false,
)
);
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