So our website has about 20k “collaborators” type of users and we’d like to stop loading all of them on the select box on the “add new post” or “add new page” PAGE. Maybe load only authors and above type of users using functions.php
Could anybody help? =)
This meta box is using the function
wp_dropdown_users()
to list all users. It has only one filter to change the output:wp_dropdown_users
.But this filter offers just the complete markup and users. Itâs neither easy nor fast to parse this via regex for user names, check their roles and then give back an new HTML.
I think the best way is to deactivate this meta box.
And then you create a custom meta box via plugin and list the authors of your blog only.
This small plugin does exactly that.
Gist 3225957 for Download