Yassir Yahya yassiryahya

View functions.php
1 2 3 4 5 6 7 8 9 10
<?php
// Add two new role.
// Full list of capabilities can be found at http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table
add_role('writer', 'Writer', array(
'delete_posts' => true,
'delete_published_posts' => true,
'edit_posts' => true,
'edit_published_posts' => true,
'publish_posts' => true,
'read' => true,
View functions.php
1 2 3 4 5 6 7 8 9 10
<?php
//
// Modify registration form to include roles
//
add_action('user_register', 'register_role');
 
function register_role($user_id, $password="", $meta=array()) {
$userdata = array();
$userdata['ID'] = $user_id;
$userdata['role'] = $_POST['cimy_uef_USERTYPE'];
Something went wrong with that request. Please try again.