The codex lists both create_users and add_users under roles and capabilities.
Does anyone know what is the difference between these two?
The codex lists both create_users and add_users under roles and capabilities.
Does anyone know what is the difference between these two?
You must be logged in to post a comment.
I explored WordPress to find difference between it and in schema.php file i found the following function only where in WordPress add_users capability is used.
Based on the comment written in code i think that the add_users capability is only used for backward compatibility and can be removed in future version of WordPress so we should use create_users capability instead of add_users capability.
I’m not completely sure, but afaik WordPress added those when the meta capabilities for Post types got added. There’re a bunch of capabilities for posts, pages and CPTs that can be either mapped to the default
*_post
caps or set to custom ones likecreate_issues
for anissues
CPT. And ascreate_posts
came with one of the more current versions, I’m pretty sure that the same goes forcreate_users
.promote_users
.Let’s say we’d like to give an editor some extra capabilities concerning users:
list_users
does just what it says.edit_users
allows him to edit user accounts with an inferior role (author/contributor/subscriber).create_users
does not work at all withoutpromote_users
(returns “You do not have sufficient permissions to access this page.”).I’m not sure when the patches will move in (they’ve “commit” state for two years now).