This support ticket is created Il y a 2 années et 10 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
The wp_dropdown_users_args hook offers more control, the following code will enable only the subscribers and administrators to be selected in the users dropdown:
function wpdocs_add_subscribers_to_dropdown( $query_args ) {
// Use this array to specify multiple roles to show in dropdown
$query_args['role__in'] = array( 'subscriber', 'administrator' );
// Use this array to specify multiple roles to hide in dropdown
$query_args['role__not_in'] = array( 'editor' );
// Unset the 'who' as this defaults to the 'author' role
unset( $query_args['who'] );
return $query_args;
}
add_filter( 'wp_dropdown_users_args', 'wpdocs_add_subscribers_to_dropdown' );
Please note that this works only for the drop-down in the custom post type list. Check this screenshot hidden link
I'll get back to you as soon as I have something to share.
The request has been escalated to the developers, however, we can't tell when this will be implemented. It may take some months before it lands into Toolset Access.
As of now, the workaround will require custom code. I shared the custom code that should work for the posts list(quick edit), and in the classic editor. You will need a different code to support the Gutenberg editor.
Please check this article for a custom code reference hidden link
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.