Adds ability to edit custom capabilities for users in the admin. Why this isn't in core is beyond me.
Register a new capability:
add_filter('custom_caps', function($caps) {
$caps[] = 'create_post_tag_terms';
return $caps;
});
$caps is an array of custom capabilities (caps) that admins should be able to edit.
That's it! Now you can edit that capability for users by going to edit user screen.
Before
After

