Title: wp-includes/capabilities.php | Developer.WordPress.org

---

# File: wp-includes/capabilities.php

 * function[user_can_for_site()](https://developer.wordpress.org/reference/functions/user_can_for_site/)
 * Returns whether a particular user has the specified capability for a given site.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/user_can_for_site/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/user_can_for_site/#uses)
   | Source: [wp-includes/capabilities.php:1045](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1045-L1070)
 * function[current_user_can_for_site()](https://developer.wordpress.org/reference/functions/current_user_can_for_site/)
 * Returns whether the current user has the specified capability for a given site.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/current_user_can_for_site/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/functions/current_user_can_for_site/#uses)
   | Source: [wp-includes/capabilities.php:939](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L939-L949)
 * function[wp_maybe_grant_site_health_caps()](https://developer.wordpress.org/reference/functions/wp_maybe_grant_site_health_caps/)
 * Filters the user capabilities to grant the ‘view_site_health_checks’ capabilities
   as necessary.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/wp_maybe_grant_site_health_caps/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/wp_maybe_grant_site_health_caps/#uses)
   | Source: [wp-includes/capabilities.php:1360](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1360-L1366)
 * function[wp_maybe_grant_resume_extensions_caps()](https://developer.wordpress.org/reference/functions/wp_maybe_grant_resume_extensions_caps/)
 * Filters the user capabilities to grant the ‘resume_plugins’ and ‘resume_themes’
   capabilities as necessary.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/wp_maybe_grant_resume_extensions_caps/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/wp_maybe_grant_resume_extensions_caps/#uses)
   | Source: [wp-includes/capabilities.php:1329](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1329-L1341)
 * hook[auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}](https://developer.wordpress.org/reference/hooks/auth_object_type_meta_meta_key_for_object_subtype/)
 * Filters whether the user is allowed to edit a specific meta key of a specific
   object type and subtype.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/auth_object_type_meta_meta_key_for_object_subtype/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/auth_object_type_meta_meta_key_for_object_subtype/#uses)
   | Source: [wp-includes/capabilities.php:497](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L497-L497)
 * hook[auth_{$object_type}_{$object_subtype}_meta_{$meta_key}](https://developer.wordpress.org/reference/hooks/auth_object_type_object_subtype_meta_meta_key/)
 * Filters whether the user is allowed to edit meta for specific object types/subtypes.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/auth_object_type_object_subtype_meta_meta_key/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/auth_object_type_object_subtype_meta_meta_key/#uses)
   | Source: [wp-includes/capabilities.php:542](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L542-L547)
 * function[wp_maybe_grant_install_languages_cap()](https://developer.wordpress.org/reference/functions/wp_maybe_grant_install_languages_cap/)
 * Filters the user capabilities to grant the ‘install_languages’ capability as 
   necessary.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/wp_maybe_grant_install_languages_cap/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/wp_maybe_grant_install_languages_cap/#uses)
   | Source: [wp-includes/capabilities.php:1313](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1313-L1319)
 * hook[auth_{$object_type}_meta_{$meta_key}](https://developer.wordpress.org/reference/hooks/auth_object_type_meta_meta_key/)
 * Filters whether the user is allowed to edit a specific meta key of a specific
   object type.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/auth_object_type_meta_meta_key/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/auth_object_type_meta_meta_key/#uses)
   | Source: [wp-includes/capabilities.php:518](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L518-L518)
 * hook[auth_{$object_type}_{$sub_type}_meta_{$meta_key}](https://developer.wordpress.org/reference/hooks/auth_object_type_sub_type_meta_meta_key/)
 * Filters whether the user is allowed to add post meta to a post of a given type.
 * Used by [0 functions](https://developer.wordpress.org/reference/hooks/auth_object_type_sub_type_meta_meta_key/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/auth_object_type_sub_type_meta_meta_key/#uses)
   | Source: [wp-includes/capabilities.php:353](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L353-L353)
 * hook[auth_post_{$post_type}_meta_{$meta_key}](https://developer.wordpress.org/reference/hooks/auth_post_post_type_meta_meta_key/)
 * Filters whether the user is allowed to add post meta to a post of a given type.
 * Used by [0 functions](https://developer.wordpress.org/reference/hooks/auth_post_post_type_meta_meta_key/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/auth_post_post_type_meta_meta_key/#uses)
   | Source: [wp-includes/capabilities.php:285](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L285-L285)
 * function[wp_roles()](https://developer.wordpress.org/reference/functions/wp_roles/)
 * Retrieves the global WP_Roles instance and instantiates it if necessary.
 * Used by [14 functions](https://developer.wordpress.org/reference/functions/wp_roles/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/wp_roles/#uses)
   | Source: [wp-includes/capabilities.php:1081](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1081-L1088)
 * function[grant_super_admin()](https://developer.wordpress.org/reference/functions/grant_super_admin/)
 * Grants Super Admin privileges.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/grant_super_admin/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/grant_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1215](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1215-L1249)
 * hook[grant_super_admin](https://developer.wordpress.org/reference/hooks/grant_super_admin/)
 * Fires before the user is granted Super Admin privileges.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/grant_super_admin/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/grant_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1228](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1228-L1228)
 * hook[granted_super_admin](https://developer.wordpress.org/reference/hooks/granted_super_admin/)
 * Fires after the user is granted Super Admin privileges.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/granted_super_admin/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/granted_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1245](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1245-L1245)
 * function[revoke_super_admin()](https://developer.wordpress.org/reference/functions/revoke_super_admin/)
 * Revokes Super Admin privileges.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/revoke_super_admin/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/revoke_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1263](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1263-L1300)
 * hook[revoke_super_admin](https://developer.wordpress.org/reference/hooks/revoke_super_admin/)
 * Fires before the user’s Super Admin privileges are revoked.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/revoke_super_admin/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/revoke_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1276](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1276-L1276)
 * hook[revoked_super_admin](https://developer.wordpress.org/reference/hooks/revoked_super_admin/)
 * Fires after the user’s Super Admin privileges are revoked.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/revoked_super_admin/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/revoked_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1295](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1295-L1295)
 * function[add_role()](https://developer.wordpress.org/reference/functions/add_role/)
 * Adds a role, if it does not exist.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/add_role/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/add_role/#uses)
   | Source: [wp-includes/capabilities.php:1135](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1135-L1141)
 * function[remove_role()](https://developer.wordpress.org/reference/functions/remove_role/)
 * Removes a role, if it exists.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/remove_role/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/remove_role/#uses)
   | Source: [wp-includes/capabilities.php:1150](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1150-L1152)
 * function[get_super_admins()](https://developer.wordpress.org/reference/functions/get_super_admins/)
 * Retrieves a list of super admins.
 * Used by [8 functions](https://developer.wordpress.org/reference/functions/get_super_admins/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_super_admins/#uses)
   | Source: [wp-includes/capabilities.php:1163](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1163-L1171)
 * function[is_super_admin()](https://developer.wordpress.org/reference/functions/is_super_admin/)
 * Determines whether user is a site admin.
 * Used by [7 functions](https://developer.wordpress.org/reference/functions/is_super_admin/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/functions/is_super_admin/#uses)
   | Source: [wp-includes/capabilities.php:1181](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1181-L1202)
 * hook[auth_post_meta_{$meta_key}](https://developer.wordpress.org/reference/hooks/auth_post_meta_meta_key/)
 * Filters whether the user is allowed to add post meta to a post.
 * Used by [0 functions](https://developer.wordpress.org/reference/hooks/auth_post_meta_meta_key/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/auth_post_meta_meta_key/#uses)
   | Source: [wp-includes/capabilities.php:268](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L268-L268)
 * hook[map_meta_cap](https://developer.wordpress.org/reference/hooks/map_meta_cap/)
 * Filters the primitive capabilities required of the given user to satisfy the 
   capability being checked.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/map_meta_cap/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/map_meta_cap/#uses)
   | Source: [wp-includes/capabilities.php:879](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L879-L879)
 * function[current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)
 * Returns whether the current user has the specified capability.
 * Used by [505 functions](https://developer.wordpress.org/reference/functions/current_user_can/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/current_user_can/#uses)
   | Source: [wp-includes/capabilities.php:913](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L913-L915)
 * function[author_can()](https://developer.wordpress.org/reference/functions/author_can/)
 * Returns whether the author of the supplied post has the specified capability.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/author_can/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/author_can/#uses)
   | Source: [wp-includes/capabilities.php:973](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L973-L986)
 * function[user_can()](https://developer.wordpress.org/reference/functions/user_can/)
 * Returns whether a particular user has the specified capability.
 * Used by [10 functions](https://developer.wordpress.org/reference/functions/user_can/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/user_can/#uses)
   | Source: [wp-includes/capabilities.php:1010](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1010-L1022)
 * function[get_role()](https://developer.wordpress.org/reference/functions/get_role/)
 * Retrieves role object.
 * Used by [10 functions](https://developer.wordpress.org/reference/functions/get_role/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/get_role/#uses)
   | Source: [wp-includes/capabilities.php:1098](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L1098-L1100)
 * function[map_meta_cap()](https://developer.wordpress.org/reference/functions/map_meta_cap/)
 * Maps a capability to the primitive capabilities required of the given user to
   satisfy the capability being checked.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/map_meta_cap/#used-by)
   | Uses [24 functions](https://developer.wordpress.org/reference/functions/map_meta_cap/#uses)
   | Source: [wp-includes/capabilities.php:45](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/capabilities.php#L45-L880)