Changeset 45508 for branches/5.2/src/wp-includes/capabilities.php
- Timestamp:
- 06/10/2019 07:49:27 AM (5 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
-
branches/5.2/src/wp-includes/capabilities.php
r44976 r45508 980 980 } 981 981 982 /** 983 * Filters the user capabilities to grant the 'view_site_health_checks' capabilities as necessary. 984 * 985 * @since 5.2.2 986 * 987 * @param bool[] $allcaps An array of all the user's capabilities. 988 * @param string[] $caps Required primitive capabilities for the requested capability. 989 * @param array $args { 990 * Arguments that accompany the requested capability check. 991 * 992 * @type string $0 Requested capability. 993 * @type int $1 Concerned user ID. 994 * @type mixed ...$2 Optional second and further parameters, typically object ID. 995 * } 996 * @param WP_User $user The user object. 997 * @return bool[] Filtered array of the user's capabilities. 998 */ 999 function wp_maybe_grant_site_health_caps( $allcaps, $caps, $args, $user ) { 1000 if ( ! empty( $allcaps['install_plugins'] ) && ( ! is_multisite() || is_super_admin( $user->ID ) ) ) { 1001 $allcaps['view_site_health_checks'] = true; 1002 } 1003 1004 return $allcaps; 1005 } 1006 982 1007 return; 983 1008
Note: See TracChangeset
for help on using the changeset viewer.