apply_filters( 'user_has_cap', bool[] $allcaps, string[] $caps, array $args, WP_User $user )  Dynamically filter a user’s capabilities.   Parameters   $allcaps bool[]    Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.    $caps string[]    Required primitive capabilities for the requested capability.    $args array    Arguments that accompany the requested capability check. 

stringRequested capability.
 
1intConcerned user ID.
 
...$2mixedOptional second and further parameters, typically object ID.
      $user WP_User    The user object.      More Information Passing in a numeric value to WP_User8b7c:f320:99b9:690f:4595:cd17:293a:c069has_cap() object has been deprecated. Passing a numeric value will generate a deprecated option warning if debugging mode is enabled via wp_config.php: Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. This will occur if a plugin or a theme calls has_cap directly. The plugin or theme needs to be updated to use the new roles and capabilities classes.   Source  File: wp-includes/class-wp-user.php. View all references  $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );
   Related  Used By    Used By Description      WP_User8b7c:f320:99b9:690f:4595:cd17:293a:c069has_cap() wp-includes/class-wp-user.php   Returns whether the user has the specified capability.   
    Changelog    Version Description     3.7.0 Added the $user parameter.   2.0.0 Introduced.    

    
{'path': 'public/docs/wordpress/hooks/user_has_cap.html', 'source': 'DevDocs.IO'}