map_meta_cap ( $cap, $user_id )

  • (string) $cap Capability name.
  • (int) $user_id User ID.
  • (int) $object_id Optional. ID of the specific object to check against if `$cap` is a "meta" cap. "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts', 'edit_others_posts', etc. The parameter is accessed via func_get_args().
  • (array) Actual capabilities for meta capability.
Defined at:


Map meta capabilities to primitive capabilities.

This does not actually compare whether the user ID has the actual capability, just what the capability or capabilities are. Meta capability list value can be 'delete_user', 'edit_user', 'remove_user', 'promote_user', 'delete_post', 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'.

Related Functions

wp_meta, update_meta_cache, add_meta, has_meta, map_deep

Top Google Results

User discussions

wpseek mobile