Is it possible to add an individual capability to a user account in modern versions of WordPress (4.6.1)? Or are roles the only thing that "admin manageable" for user accounts?
If it is possible, where in the admin can you do this?
Is it possible to add an individual capability to a user account in modern versions of WordPress (4.6.1)? Or are roles the only thing that "admin manageable" for user accounts?
If it is possible, where in the admin can you do this?
No there isn't anything built into the core WordPress, I would recommend this plugin: https://wordpress.org/plugins/user-roles-and-capabilities/screenshots/
Or you would use PHP to add a capability to a specific role (or user): https://codex.wordpress.org/Function_Reference/add_cap
No, there's no built-in feature for this (as of 4.6.1).
The best plugin I've found (and use) is called, Members.
Then instead of changing caps at the user-level, you'd use the plugin to:
Much easier to manage and maintain.
Add this code to functions PHP, and remove it after adding the cap.
Get User via get_user_by() you can use the ID, slug, email, or login info of the user. Our cap is "manage_xyz" in this example. 5 is the user id of the user you want to add cap.
$my_user = get_user_by('ID',5);
if (!$my_user->has_cap('manage_xyz')) {
$my_user->add_cap('manage_xyz');
}