WordPress at Your Fingertips
filter is not described

map_meta_cap filter-hook . WP 2.8.0

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


add_filter( 'map_meta_cap', 'filter_function_name_2825', 10, 4 );
function filter_function_name_2825( $caps, $cap, $user_id, $args ){
	// filter...

	return $caps;
Primitive capabilities required of the user.
Capability being checked.
The user ID.
Adds context to the capability check, typically starting with an object ID.


Since 2.8.0 Introduced.

Where the hook is called

wp-includes/capabilities.php 658
return apply_filters( 'map_meta_cap', $caps, $cap, $user_id, $args );

Where in WP core the hook is used WordPress

wp-includes/class-wp-customize-manager.php 2949
add_filter( 'map_meta_cap', array( $this, 'grant_edit_post_capability_for_changeset' ), 10, 4 );
wp-includes/class-wp-customize-manager.php 2956
remove_filter( 'map_meta_cap', array( $this, 'grant_edit_post_capability_for_changeset' ), 10 );