USER01 is not showing in Author drop down list while editing a Page if he's in the my custom ROLE "mycustomrole".
If I change his role as an AUTHOR, and add the very same custom and non custom capacities, he's shown in the list.
I created this role programatically, as shown below.
Is there something particular to add in order to see it in my Authors list?
function cjg_4cast_addroles(){
cjg_add_role('mycustomrole','My Custom Role',array(
array('singular' => 'side-add', 'plural' => 'side-adds'),
array('singular' => 'partner', 'plural' => 'partners')
),
array(
'read' => true,
'upload_files' => true,
'edit_files' => true,
'edit_pages' => true,
'edit_published_pages' => true,
'publish_pages' => true,
'delete_pages' => true,
'delete_private_pages' => true,
'edit_private_pages' => true,
'read_private_pages' => true,
'publish_posts' => true,
'edit_posts' => true,
'edit_published_posts' => true,
)
);
}
function cjg_add_role($role_name,$role_name_display,$custom_type_slugs,$capabilities){
foreach($custom_type_slugs as $custom_type_slug){
$capabilities = array_merge($capabilities,
cjg_capabilitiesarray_fromslug($custom_type_slug['singular'],$custom_type_slug['plural'])
);
}
add_role( $role_name, $role_name_display, $capabilities);
}
function cjg_capabilitiesarray_fromslug($singular,$plural){
return array(
"edit_$singular" => true,
"read_$singular" => true,
"delete_$singular" => true,
"edit_$plural" => true,
"edit_others_$plural" => true,
"publish_$plural" => true,
"read_private_$plural" => true,
);
}