site_health_tab_content
Action HookDescription
Fires when outputting the content of a custom Site Health tab. This action fires right after the Site Health header, and users are still subject to the capability checks for the Site Health page to view any custom tabs and their contents.Hook Information
File Location |
wp-admin/site-health.php
View on GitHub
|
Hook Type | Action |
Line Number | 220 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$tab
|
The slug of the tab that was requested. |
Usage Examples
Basic Usage
<?php
// Hook into site_health_tab_content
add_action('site_health_tab_content', 'my_custom_function', 10, 1);
function my_custom_function($tab) {
// Your custom code here
}
Source Code Context
wp-admin/site-health.php:220
- How this hook is used in WordPress core
<?php
215 *
216 * @since 5.8.0
217 *
218 * @param string $tab The slug of the tab that was requested.
219 */
220 do_action( 'site_health_tab_content', $_GET['tab'] );
221
222 require_once ABSPATH . 'wp-admin/admin-footer.php';
223 return;
224 } else {
225 wp_admin_notice(
PHP Documentation
<?php
/**
* Fires when outputting the content of a custom Site Health tab.
*
* This action fires right after the Site Health header, and users are still subject to
* the capability checks for the Site Health page to view any custom tabs and their contents.
*
* @since 5.8.0
*
* @param string $tab The slug of the tab that was requested.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-admin/site-health.php
Related Hooks
Related hooks will be displayed here in future updates.