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?
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.
/**
* Create and modify WordPress roles for WordPress 3.0.
*
* @since 3.0.0
*/
function populate_roles_300() {
$role =& get_role( 'administrator' );
if ( !empty( $role ) ) {
$role->add_cap( 'update_core' );
$role->add_cap( 'list_users' );
$role->add_cap( 'remove_users' );
// Never used, will be removed. create_users or
// promote_users is the capability you're looking for.
$role->add_cap( 'add_users' );
$role->add_cap( 'promote_users' );
$role->add_cap( 'edit_theme_options' );
$role->add_cap( 'delete_themes' );
$role->add_cap( 'export' );
}
}
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.