Title: map_meta_cap
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘map_meta_cap’, string[] $caps, string $cap, int $user_id, array $args )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#wp--skip-link--target)

Filters the primitive capabilities required of the given user to satisfy the capability
being checked.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#parameters)󠁿

 `$caps`string[]

Primitive capabilities required of the user.

`$cap`string

Capability being checked.

`$user_id`int

The user ID.

`$args`array

Adds context to the capability check, typically starting with an object ID.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'map_meta_cap', $caps, $cap, $user_id, $args );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/capabilities.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/capabilities.php#L879)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/capabilities.php#L879-L879)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#related)󠁿

| Used by | Description | 
| [map_meta_cap()](https://developer.wordpress.org/reference/functions/map_meta_cap/)`wp-includes/capabilities.php` |

Maps a capability to the primitive capabilities required of the given user to satisfy the capability being checked.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/map_meta_cap/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fmap_meta_cap%2F)
before being able to contribute a note or feedback.