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?
- Add custom column to Users admin panel
- Edit “thank you for creating with WordPress” in version 3.3.1
- Get current active wp color scheme
- Cannot login to WordPress Admin with SSL terminated load balancer
- How to fix admin stylesheet muck-up? [closed]
- Turn off admin emails for new user registrations
- Adding custom Javascript to the head tag in Admin
- WordPress Left Hand Side Admin Menu Always Collapsed
- Re-ordering Admin Submenu Sections
- How to Remove the “Restore” Link in Quick Edit?
- How to add_filter/action to comment out CSS generated by admin function?
- Remove default WordPress styling from metaboxes on edit post pages?
- What are WordPress admin supported browsers?
- How to test for Super Admin
- how to redirect to url.com/wp-admin if url.com/admin is typed in?
- Manage users custom column add class “num”
- Find Memory Usage of Admin
- Allow administrators to pick post author on custom post type edit screen
- Can’t access dashboard as administrator, login as any other level works though
- Enabling users to upload files
- How to display a WordPress notice on create_term action
- Super administrator db name
- Dashicons and Pseudo :before
- Hide admin toolbar based on a query string
- Remove Permalink From Admin Edit Post
- When submitting the form site.com/blog/wp-admin it goes to site.com/wp-admin
- How can I add a menu item to the admin area?
- Order All Pages table in administration
- WordPress Admin Menu Order for ‘admin.php’ pages
- Is there a filter to remove or replace the post title’s link in the admin post table view (edit.php)?
- Shows site under construction but comes up after I login to admin
- How To Create A File Archive in WordPress?
- Wp-Admin FTPS Connection Error unlike Filezilla
- Newly created user role not displaying on users screen
- After upgrading to WP 5.1.1 sometimes I need to reauth infinitively
- Trying to hide a submenu link which is created by Co-authors Plus plugin
- Find out if post was just updated on post edit screen
- Wp-admin page not found following copy of site
- Allow author to upload image via Media button without plugin
- wordpress login loop after install
- disable trashability for certain pages
- How to remove certain feed from my dashboard in WP admin
- Hiding the media-new.php File URL option via jQuery