I want to create new role on Wordpress site, I've made plugin and put this function on plugin file. Here is example code:
add_role( 'imageuploader', 'Image Uploader', $capabilities );
$capabilities = array(
'read' => true,
'edit_posts' => true,
'delete_posts' => true,
'upload_files' => true,
);
After that, I'm create new user and assign this role to that user. I've try to login WP admin using that user login and it's howed this: You do not have sufficient permissions to access this page.
Why it's showed that error? I've add read capabilities on that user role.