admin can not change author profile picture
admin can not change author profile picture
admin can not change author profile picture
If it’s supposed to edit its own post only, make it with author‘s capabilities. If it should edit posts of other users, as well, make it with editor‘s capabilities. Case 1 function wpse_add_your_role() { $role = get_role( ‘author’ ); if ( ! empty( get_role( ‘your_role’ ) ) ) { remove_role( ‘your_role’ ); } add_role( ‘your_role’, … Read more
Create a Capability category to group a few custom Capabilities
Delete admin edit/delete links in users list wordpress admin
How can restrict certain users from delete a category but can view only in wordpress?
You can club it with remove_menu_page to first remove the page & then re-adding it Copy the add_menu_page line from plugin. Paste it in your theme & change the capability. Then immediately before this line add remove_menu_page($menu_page_slug); Use the same hook but with a higher priority
$capa is a PHP expression and will always evaluate to administrator. Use the capability read instead – every role (by default) has this.
First of all you need to remove capability edit_others_posts if assigned to vendor role. Then use the code snippet given below: function posts_for_current_author($query) { global $pagenow; if( ‘edit.php’ != $pagenow || !$query->is_admin ) return $query; if( !current_user_can( ‘edit_others_posts’ ) ) { global $user_ID; $query->set(‘author’, $user_ID ); } return $query; } add_filter(‘pre_get_posts’, ‘posts_for_current_author’); Above code allows … Read more
It was a simple thing when thinking of it… I needed to add: $role->add_cap( ‘edit_others_pages ‘ );
As far as I know there’s no standard capabilities just for attachments. You’d need edit_posts. function add_theme_caps() { $role = get_role( ‘editor’ ); $role->add_cap( ‘edit_others_posts’ ); } add_action( ‘admin_init’, ‘add_theme_caps’);