wp_get_update_php_annotation

函数
wp_get_update_php_annotation ( No parameters )
返回值
  • (string) Update PHP page annotation. An empty string if no custom URLs are provided.
定义位置
相关方法
wp_update_php_annotationwp_get_update_php_urlwp_get_update_datawp_get_update_https_url_get_path_to_translation
引入
5.2.0
弃用
-

wp_get_update_php_annotation: 这个函数检索最新可用的PHP更新的注释。它返回一个包含最新PHP更新注释的字符串,它提供了关于更新的信息和任何重要的注释。

返回虚拟主机改变”Update PHP”页面URL的默认注释。

如果虚拟主机改变了默认的”Update PHP”页面URL,此函数将在{@see}之后使用,以返回一个一致的注释。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_get_update_php_annotation() {
$update_url = wp_get_update_php_url();
$default_url = wp_get_default_update_php_url();
if ( $update_url === $default_url ) {
return '';
}
$annotation = sprintf(
/* translators: %s: Default Update PHP page URL. */
__( 'This resource is provided by your web host, and is specific to your site. For more information, <a href="%s" target="_blank">see the official WordPress documentation</a>.' ),
esc_url( $default_url )
);
return $annotation;
}
function wp_get_update_php_annotation() { $update_url = wp_get_update_php_url(); $default_url = wp_get_default_update_php_url(); if ( $update_url === $default_url ) { return ''; } $annotation = sprintf( /* translators: %s: Default Update PHP page URL. */ __( 'This resource is provided by your web host, and is specific to your site. For more information, <a href="%s" target="_blank">see the official WordPress documentation</a>.' ), esc_url( $default_url ) ); return $annotation; }
function wp_get_update_php_annotation() {
	$update_url  = wp_get_update_php_url();
	$default_url = wp_get_default_update_php_url();

	if ( $update_url === $default_url ) {
		return '';
	}

	$annotation = sprintf(
		/* translators: %s: Default Update PHP page URL. */
		__( 'This resource is provided by your web host, and is specific to your site. For more information, <a href="%s" target="_blank">see the official WordPress documentation</a>.' ),
		esc_url( $default_url )
	);

	return $annotation;
}

常见问题

FAQs
查看更多 >