wp_maybe_grant_site_health_caps

Advertisement

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

$allcaps

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

$caps

(string[]) (Required) Required primitive capabilities for the requested capability.

$args

(array) (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.

$user

(WP_User) (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

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.2 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.