Changeset 45507 for trunk/src/wp-includes/capabilities.php
- Timestamp:
- 06/10/2019 07:41:12 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/capabilities.php
r45419 r45507 1026 1026 } 1027 1027 1028 /** 1029 * Filters the user capabilities to grant the 'view_site_health_checks' capabilities as necessary. 1030 * 1031 * @since 5.2.2 1032 * 1033 * @param bool[] $allcaps An array of all the user's capabilities. 1034 * @param string[] $caps Required primitive capabilities for the requested capability. 1035 * @param array $args { 1036 * Arguments that accompany the requested capability check. 1037 * 1038 * @type string $0 Requested capability. 1039 * @type int $1 Concerned user ID. 1040 * @type mixed ...$2 Optional second and further parameters, typically object ID. 1041 * } 1042 * @param WP_User $user The user object. 1043 * @return bool[] Filtered array of the user's capabilities. 1044 */ 1045 function wp_maybe_grant_site_health_caps( $allcaps, $caps, $args, $user ) { 1046 if ( ! empty( $allcaps['install_plugins'] ) && ( ! is_multisite() || is_super_admin( $user->ID ) ) ) { 1047 $allcaps['view_site_health_checks'] = true; 1048 } 1049 1050 return $allcaps; 1051 } 1052 1028 1053 return; 1029 1054
Note: See TracChangeset
for help on using the changeset viewer.