wp_get_direct_update_https_url

函数
wp_get_direct_update_https_url ( No parameters )
返回值
  • (string) URL for directly updating to HTTPS or empty string.
定义位置
相关方法
wp_get_default_update_https_urlwp_get_update_https_urlwp_get_direct_php_update_urlwp_get_default_update_php_urlwp_get_update_php_url
引入
5.7.0
弃用
-

wp_get_direct_update_https_url: 这个函数返回WordPress的直接HTTPS更新URL。它用于确定检查WordPress的更新时使用的URL。

获取直接更新网站使用HTTPS的URL。

只有在指定了`WP_DIRECT_UPDATE_HTTPS_URL`环境变量或使用{@see ‘wp_direct_update_https_url’}过滤器时,才会返回一个URL。这允许主机将用户直接发送到他们可以更新他们的网站以使用HTTPS的页面。

function wp_get_direct_update_https_url() {
	$direct_update_url = '';

	if ( false !== getenv( 'WP_DIRECT_UPDATE_HTTPS_URL' ) ) {
		$direct_update_url = getenv( 'WP_DIRECT_UPDATE_HTTPS_URL' );
	}

	/**
	 * Filters the URL for directly updating the PHP version the site is running on from the host.
	 *
	 * @since 5.7.0
	 *
	 * @param string $direct_update_url URL for directly updating PHP.
	 */
	$direct_update_url = apply_filters( 'wp_direct_update_https_url', $direct_update_url );

	return $direct_update_url;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 20:33:00

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: