Changeset 54165 for trunk/src/wp-admin/menu.php
- Timestamp:
- 09/14/2022 09:12:12 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu.php
r52415 r54165 343 343 } 344 344 345 $site_health_count = ''; 346 if ( ! is_multisite() && current_user_can( 'view_site_health_checks' ) ) { 347 $get_issues = get_transient( 'health-check-site-status-result' ); 348 349 $issue_counts = array(); 350 351 if ( false !== $get_issues ) { 352 $issue_counts = json_decode( $get_issues, true ); 353 } 354 355 if ( ! is_array( $issue_counts ) || ! $issue_counts ) { 356 $issue_counts = array( 357 'good' => 0, 358 'recommended' => 0, 359 'critical' => 0, 360 ); 361 } 362 363 $site_health_count = sprintf( 364 '<span class="menu-counter site-health-counter count-%s"><span class="count">%s</span></span>', 365 $issue_counts['critical'], 366 number_format_i18n( $issue_counts['critical'] ) 367 ); 368 } 369 345 370 $menu[75] = array( __( 'Tools' ), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'dashicons-admin-tools' ); 346 371 $submenu['tools.php'][5] = array( __( 'Available Tools' ), 'edit_posts', 'tools.php' ); 347 372 $submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' ); 348 373 $submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' ); 349 $submenu['tools.php'][20] = array( __( 'Site Health' ), 'view_site_health_checks', 'site-health.php' ); 374 /* translators: %s: Number of critical Site Health checks. */ 375 $submenu['tools.php'][20] = array( sprintf( __( 'Site Health %s' ), $site_health_count ), 'view_site_health_checks', 'site-health.php' ); 350 376 $submenu['tools.php'][25] = array( __( 'Export Personal Data' ), 'export_others_personal_data', 'export-personal-data.php' ); 351 377 $submenu['tools.php'][30] = array( __( 'Erase Personal Data' ), 'erase_others_personal_data', 'erase-personal-data.php' );
Note: See TracChangeset
for help on using the changeset viewer.