钩子文档

wp_direct_php_update_url

💡 云策文档标注

概述

wp_direct_php_update_url 是一个 WordPress 过滤器,用于修改直接从主机更新站点运行 PHP 版本的 URL。它允许开发者自定义更新链接,适用于需要调整更新流程的场景。

关键要点

  • 这是一个过滤器,用于过滤直接更新 PHP 版本的 URL。
  • 参数 $direct_update_url 是一个字符串,表示直接更新 PHP 的 URL。
  • 通过 apply_filters 调用,钩子名为 'wp_direct_php_update_url'。
  • 相关函数 wp_get_direct_php_update_url() 用于获取此 URL。
  • 在 WordPress 5.1.1 版本中引入。

📄 原文内容

Filters the URL for directly updating the PHP version the site is running on from the host.

Parameters

$direct_update_urlstring
URL for directly updating PHP.

Source

$direct_update_url = apply_filters( 'wp_direct_php_update_url', $direct_update_url );

Changelog

Version Description
5.1.1 Introduced.