You will need to hook into attachment_fields_to_edit
and unset them for a role.
You can use current_user_can('author')
http://codex.wordpress.org/Function_Reference/current_user_can
Example to remove image alt field
function remove_caption($form_fields) {
if (current_user_can('author')){
$form_fields['image_alt']['input'] = 'hidden';
return $form_fields;
}}
add_filter('attachment_fields_to_edit','remove_caption', 15, 2);
My initial post used unset
but I tried it and it did not work, from the example in this post: How can I remove fields in the attachment editor? , not sure why, instead the example above works using hidden
.
Related Posts:
- How do I remove dashboard access from specific user roles?
- How to remove list view from media library?
- Prevent author from changing their posts if admin has modified
- Make A WordPress Page Accessible To Admins Only, Redirect Other User Roles
- How to remove administrator role in settings -> general -> New User Default Role?
- Uploading files in admin panel?
- Create un-removeable user
- Thickbox hacking – removing fields
- Custom CSS In Admin Only For Certain Roles
- Remove ability to access certain admin menus
- Remove admin AND editor from the “change role to” menu in user listing
- Possible to create placeholder images in WordPress editor that are clickable (should bring up uploader)?
- How to remove “Super Admin” from All Users for those that are not a “Super Admin”?
- Making Media Library “Alternative Text” Field Required
- custom tabs in media uploader
- wordpress upload http error?
- Blocking Administrative Access to Authors and Subcribers?
- Customize Admin Users Screen based on Role
- Make certain pages uneditable by editors?
- Restrict dashboard access for specific user roles to specific actions
- Refreshing collections in the admin media manager
- How can I restore admin capabilities?
- How to restrict wp-admin and prevent upload errors
- What determines whether admin toolbar is shown to a logged-in user?
- Editing the Backend Uploader
- How do you set up a WordPress blog with multiple authors to allow something like StackExchange’s “community wiki” feature?
- Unable to upload image using the standard uploader in the WP admin (v4.3)
- WordPress post feature image not uploading
- WordPress Remove Submenus
- Client system for media review?
- Only Admin can Edit, Delete or Update
- add_cap for editor but no admin role
- Shared account / dual blogging in WordPress
- Bind custom role to admin page
- remove menus for a specific role?
- current_user_can(‘administrator’) not working in custom login
- Show global Message in User Profiles with admin only Input field in WordPress Backend
- How to make sure your admin doesn’t hi-jack you site?
- Redirect admin 403 “Cheatin uh?” admin pages
- Given multiple admin accounts, how can I make it so that only admin with X username can edit posts
- How should I setup the “Users” area to hand over to a client?
- solution to prevent specific admins from altering site contents
- Admin user roles/permissions
- Posts in sidebar only by admin
- Custom Jquery in admin breaks media-upload script
- Problem with implenting Uploadify with WordPress
- Hide media library images from other roles uploaded by admin
- Redirect non-admin after login, and in url – /admin
- Hide top admin panel for non admin and non editors
- How can I create multiple different admin roles with their own capabilities
- add instructions to upload pages and / or forms
- Different role for free and pro users in wordpress without using bbpress
- Run filter if only it was run from specific admin page ( ‘upload_dir’ changed )
- Making a custom upload form and page in the admin section
- how to automatically cleanup failed WordPress uploads in /tmp?
- send information from the thickbox image uploader second tab
- Different customer login form than administrator login form?
- What are the standard admin CSS id/class tags?
- Admin Ajax is returning 0
- Add custom column to Users admin panel
- wp_verify_nonce vs check_admin_referer
- Add a Separator to the Admin Menu?
- How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
- how to know if admin is in edit page or post [duplicate]
- Modal window from within WordPress admin
- Where in WP can I check history or log of updates of plugins etc?
- Adding a custom admin page
- How does admin-ajax.php work?
- Remove update nags for non-admins [duplicate]
- Give Editor Access To Sidebar
- How to remove entire admin menu?
- How can I speed up my WP admin section?
- How to pass parameters to admin_notices?
- Admin: very slow edit page caused by core meta query
- if admin is logged in
- Search posts by ID in admin
- How to Change the Default Home Page for the WordPress Dashboard?
- Setting admin edit panels & metaboxes positions and visibility for ALL users and admins
- Find out which moderator approved comment?
- The website cannot display the page
- How To Remove WordPress Version From The Admin Footer
- Sort pages in loop by admin’s page attributes order field?
- Edit “thank you for creating with WordPress” in version 3.3.1
- Hide other users’ posts in admin panel
- Set Default Admin Colour For All Users
- Editor Styles and Typekit
- WordPress admin stylesheet
- This CSS Stuffing Works, But Is This A Good Practice?
- Is it possible to create a WordPress tour? V3.3.1
- Securing Admin Accounts – Username Discovery
- is_admin() returns true when using admin-ajax.php from front end script
- How to save dismissable notice state in WP 4.2?
- How do I optimize a custom post type admin page with 25,000 posts?
- Settings API – adding setting fields dynamically?
- Allow contributor role to upload images and not edit already published articles
- Disable Media Uploads to non Admin Users
- How do I load a CSS style into WordPress admin area only?
- Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”
- Can an admin check passwords of registered users?
- How can I target WordPress 3.8 new interface MP6 with CSS?