Change WordPress user roles and capabilities › Forums › New Feature Request › Screen Options
Tagged: Screen Options
- This topic has 8 replies, 5 voices, and was last updated 5 years, 7 months ago by
Vladimir.
-
AuthorPosts
-
05/04/2016 at 15:14 #2184
dweb360
ParticipantHello,
Can you add ability to hide Screen Options by User roles ?
Thank you in advance05/04/2016 at 15:39 #2185Vladimir
KeymasterHi,
Thanks for the idea. I will look how to make it.
09/09/2016 at 17:32 #2717shackbill
ParticipantHey Vlad.. Wondering if you ever had any ideas on how to do this? I wonder if you could just add a Role Dropdown Selector to each page and then select the options to display/hide and press apply and it would apply to that particular role. see attached image. Just a thought.
09/09/2016 at 17:59 #2719Vladimir
KeymasterHi,
It could be suitable for admin to manage it this way. Thanks for the right direction.14/11/2017 at 18:30 #4399JamesJosephFinn
ParticipantHi Vladimir,
Thanks for such an incredibly useful plugin!
I would like to put in my support for adding this feature.
My use-case is I have purchased the “WooCommerce Product Reviews Pro” plugin, and if “shop_manager” has the dashboard “screen option > activity” checked, “Recent Comments” will be listed in this widget, which in turn grants them the contextual ability (when hovering over the individual comments) to “approve”, “delete”, “edit”, etc.
This happens even when access to the core permission “moderate_comments” has been revoked. Unchecking “moderate_comments” will remove the “reviews” tab from the “WooCommerce” submenu, but, strangely, this functionality is still exposed in the dashboard.
14/11/2017 at 21:59 #4400JamesJosephFinn
ParticipantActually, rescind my last comment! The contextual hover options are no longer there. I did something, and don’t know what. Regardless, again, yours is a great tool!!
15/11/2017 at 01:39 #4401Vladimir
KeymasterHi James,
“Hide Screen Options by user roles” feature is still in plans.
Thanks for the good feedback.25/07/2019 at 03:35 #5845RunningBe
ParticipantHi Vladimir,
Would like to set as checked a particular Screen Option (namely, Slug) for a specific role in the Edit Media screen. Was hoping URE Pro would allow me to do this, but apparently not?
I’ve successfully used URE Pro to hide Meta Boxes, thank you.
Regards, Barry
30/07/2019 at 08:09 #5856Vladimir
KeymasterHi Barry,
Thanks for the feedback.
URE does not include UI to turn ON for a role selected screen option (or in other words, show meta box). You can use this code though:
/** * Turn ON 'Slug' screen option for user with 'author' role at the Media Library item (attachment) edit page */ add_filter( 'hidden_meta_boxes', 'show_slug_metabox', 10, 3 ); function show_slug_metabox( $hidden, $screen, $use_defaults ) { if ( $screen->id!=='attachment') { return $hidden; } $user = wp_get_current_user(); if ( empty( $user) || empty( $user->roles ) ) { return $hidden; } if ( !in_array( 'author', $user->roles ) ) { return $hidden; } $slug_key = array_search( 'slugdiv', $hidden ); if ( $slug_key !== false ) { unset( $hidden[ $slug_key ] ); } return $hidden; }
Change ‘author’ to your own role ID and setup this code as a Must Use plugin.
-
AuthorPosts
- You must be logged in to reply to this topic.