wp_get_default_update_php_url()
云策文档标注
概述
wp_get_default_update_php_url() 函数用于获取默认的 PHP 版本更新信息 URL,主要用于与 wp_get_update_php_url() 返回的 URL 进行比较,不应直接用于检索 URL。
关键要点
- 函数返回一个字符串,表示默认的 PHP 更新信息 URL。
- 不应直接使用此函数获取 URL,而应使用 wp_get_update_php_url()。
- 此函数不允许修改返回的 URL,仅用于比较实际使用的 URL 与默认 URL。
- 内部使用 _x() 函数进行本地化翻译。
- 自 WordPress 5.1.0 版本引入。
代码示例
function wp_get_default_update_php_url() {
return _x( 'https://wordpress.org/support/update-php/', 'localized PHP upgrade information page' );
}
原文内容
Gets the default URL to learn more about updating the PHP version the site is running on.
Description
Do not use this function to retrieve this URL. Instead, use wp_get_update_php_url() when relying on the URL.
This function does not allow modifying the returned URL, and is only used to compare the actually used URL with the default one.
Source
function wp_get_default_update_php_url() {
return _x( 'https://wordpress.org/support/update-php/', 'localized PHP upgrade information page' );
}
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |