wp_dropdown_users_args not called on edit.php or post.php anymore?
-
Hi, we’ve been using the wp_dropdown_users_args as a filter to add users to the dropdown based on user role in order to assign blog posts to them. However, it seems that that filter is being skipped and only admins are appearing in the dropdown. Is this a bug in wordpress or is there a new way of doing this? Thanks in advance.
add_action('wp_dropdown_users_args', 'filter_authors'); function filter_authors($args) { if (isset($args['who'])) { $args['role__in'] = ['administrator', 'employee', 'blog_author']; unset($args['who']); } return $args; }
this is the code we’re currently using that was working until recently. Now the filter isn’t being called at all
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_dropdown_users_args not called on edit.php or post.php anymore?’ is closed to new replies.