钩子文档

site_status_persistent_object_cache_url

💡 云策文档标注

概述

此文档介绍了一个 WordPress 过滤器 Hook,用于修改持久化对象缓存健康检查的操作 URL。它允许开发者自定义指向相关文档的链接。

关键要点

  • Hook 名称:site_status_persistent_object_cache_url
  • 用途:过滤持久化对象缓存健康检查的操作 URL,通常用于提供自定义的学习链接
  • 参数:$action_url(字符串类型),表示健康检查的链接
  • 引入版本:WordPress 6.1.0
  • 相关函数:WP_Site_Health::get_test_persistent_object_cache() 用于测试站点是否使用持久化对象缓存

代码示例

$action_url = apply_filters(
    'site_status_persistent_object_cache_url',
    /* translators: Localized Support reference. */
    __( 'https://developer.wordpress.org/advanced-administration/performance/optimization/#persistent-object-cache' )
);

📄 原文内容

Filters the action URL for the persistent object cache health check.

Parameters

$action_urlstring
Learn more link for persistent object cache health check.

Source

$action_url = apply_filters(
	'site_status_persistent_object_cache_url',
	/* translators: Localized Support reference. */
	__( 'https://developer.wordpress.org/advanced-administration/performance/optimization/#persistent-object-cache' )
);

Changelog

Version Description
6.1.0 Introduced.