The hook occurs in the following file:
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
/** * Filters a user's capabilities depending on specific context and/or privilege. * * @since 2.8.0 * * @param string $caps Array of the user's capabilities. * @param string $cap Capability name. * @param int $user_id The user ID. * @param array $args Adds the context to the cap. Typically the object ID. */ return apply_filters( 'map_meta_cap', $caps, $cap, $user_id, $args ); } /** * Whether the current user has a specific capability. * * While checking against particular roles in place of a capability is supported * in part, this practice is discouraged as it may produce unreliable results. * * Note: Will always return true if the current user is a super admin, unless specifically denied.