site_status_persistent_object_cache_notes хук-фильтрWP 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.

Использование

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(строка)
The notes appended to the health check description.
$available_services(string[])
The list of available persistent object cache services.

Список изменений

С версии 6.1.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.