site_status_persistent_object_cache_notes filter-hookWP 6.1.0

Filters the second paragraph of the health check's description when suggesting the use of a persistent object cache.

Hosts may want to replace the notes to recommend their preferred object caching solution.

Plugin authors may want to append notes (not replace) on why object caching is recommended for their plugin.

Usage

add_filter( 'site_status_persistent_object_cache_notes', 'wp_kama_site_status_persistent_object_cache_notes_filter', 10, 2 );

/**
 * Function for `site_status_persistent_object_cache_notes` filter-hook.
 * 
 * @param string   $notes              The notes appended to the health check description.
 * @param string[] $available_services The list of available persistent object cache services.
 *
 * @return string
 */
function wp_kama_site_status_persistent_object_cache_notes_filter( $notes, $available_services ){

	// filter...
	return $notes;
}
$notes(string)
The notes appended to the health check description.
$available_services(string[])
The list of available persistent object cache services.

Changelog

Since 6.1.0 Introduced.

Where the hook is called

WP_Site_Health::get_test_persistent_object_cache()
site_status_persistent_object_cache_notes
wp-admin/includes/class-wp-site-health.php 2679
$notes = apply_filters( 'site_status_persistent_object_cache_notes', $notes, $available_services );

Where the hook is used in WordPress

Usage not found.