Summery Summery

Filters the user capabilities to grant the ‘view_site_health_checks’ capabilities as necessary.

Syntax Syntax

wp_maybe_grant_site_health_caps( bool[] $allcaps, string[] $caps, array $args, WP_User $user )

Parameters Parameters


(Required) An array of all the user's capabilities.


(Required) Required primitive capabilities for the requested capability.


(Required) Arguments that accompany the requested capability check.

  • (string) Requested capability.
  • '1'
    (int) Concerned user ID.
  • '...$2'
    (mixed) Optional second and further parameters, typically object ID.


(Required) The user object.

Return Return

(bool[]) Filtered array of the user's capabilities.

Source Source

File: wp-includes/capabilities.php

 * Filters the user capabilities to grant the 'install_languages' capability as necessary.
 * A user must have at least one out of the 'update_core', 'install_plugins', and
 * 'install_themes' capabilities to qualify for 'install_languages'.
 * @since 4.9.0


Changelog Changelog

Version Description
5.2.2 Introduced.


Leave a Reply