Custom taxonomies capabilities

Just like CPT capabilities those of taxonomy are also customizable, in register_taxonomy(): capabilities ‘manage_terms’ – ‘manage_categories’ ‘edit_terms’ – ‘manage_categories’ ‘delete_terms’ – ‘manage_categories’ ‘assign_terms’ – ‘edit_posts’ Since your authors only have edit_posts it works as you observe — they can assign existing terms, but not create them. You can customize capabilities for taxonomy in question and … Read more

Temporary capability for current_user_can()

Yes, just filter ‘user_has_cap’. You get an array with the current capabilities that you can change without touching the database. Sample Code add_filter( ‘user_has_cap’, ‘wpse_53230_catch_cap’, 10, 3 ); /** * See WP_User::has_cap() in wp-includes/capabilities.php * * @param array $allcaps Existing capabilities for the user * @param string $caps Capabilities provided by map_meta_cap() * @param array … Read more

What’s the difference between Role and Meta capabilities; When to use map_meta_cap() filter

difference between Role and Meta capabilities That would be better to ask the compare Role with Capabilities, not just Meta capabilities, but as a simple answer: A Role defines a set of tasks a user assigned the role is allowed to perform. Capabilities are assigned to Roles difference between Meta and Primitive capabilities? Meta capabilities … Read more

What’s the difference between the capability remove_users and delete_users?

The difference is really no difference in regular (single install) WordPress. It’s in a multisite install (network) where there is a difference. In multisite, only a Super Admin (who can manage everything on the network) has delete_users capability, while an “admin” (who would own/manage a single site) can remove_users from their site, but cannot delete … Read more

Why is javascript allowed in my post content?

If you have the unfiltered_html capability then you can use JS. Admins and editors have this capability by default. Personally I use a plugin for fine control of my users’ capabilities, but you can make this change easily in code: $role = get_role( ‘administrator’ ); $role->remove_cap( ‘unfiltered_html’ ); $role = get_role( ‘editor’ ); $role->remove_cap( ‘unfiltered_html’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)