Filter hook 'site_health_navigation_tabs'

in WP Core File wp-admin/site-health.php at line 31

View Source

site_health_navigation_tabs

Filter Hook
Description
Filters the extra tabs for the Site Health navigation bar. Add a custom page to the Site Health screen, based on a tab slug and label. The label you provide will also be used as part of the site title.

Hook Information

File Location wp-admin/site-health.php View on GitHub
Hook Type Filter
Line Number 31

Hook Parameters

Type Name Description
string[] $tabs An associative array of tab labels keyed by their slug.

Usage Examples

Basic Usage
<?php
// Hook into site_health_navigation_tabs
add_filter('site_health_navigation_tabs', 'my_custom_filter', 10, 1);

function my_custom_filter($tabs) {
    // Your custom filtering logic here
    return $tabs;
}

Source Code Context

wp-admin/site-health.php:31 - How this hook is used in WordPress core
<?php
  26   *
  27   * @since 5.8.0
  28   *
  29   * @param string[] $tabs An associative array of tab labels keyed by their slug.
  30   */
  31  $tabs = apply_filters( 'site_health_navigation_tabs', $tabs );
  32  
  33  $wrapper_classes = array(
  34  	'health-check-tabs-wrapper',
  35  	'hide-if-no-js',
  36  	'tab-count-' . count( $tabs ),

PHP Documentation

<?php
/**
 * Filters the extra tabs for the Site Health navigation bar.
 *
 * Add a custom page to the Site Health screen, based on a tab slug and label.
 * The label you provide will also be used as part of the site title.
 *
 * @since 5.8.0
 *
 * @param string[] $tabs An associative array of tab labels keyed by their slug.
 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/site-health.php
Related Hooks

Related hooks will be displayed here in future updates.