钩子文档

network_home_url

💡 云策文档标注

概述

network_home_url 是一个 WordPress 过滤器,用于修改网络主页的 URL。它允许开发者在生成网络主页 URL 时进行自定义处理。

关键要点

  • 过滤器名称:network_home_url
  • 参数:$url(完整网络主页 URL)、$path(相对路径)、$orig_scheme(原始方案)
  • 应用场景:在 network_home_url() 函数中调用,用于检索当前网络的主页 URL
  • 引入版本:WordPress 3.0.0

📄 原文内容

Filters the network home URL.

Parameters

$urlstring
The complete network home URL including scheme and path.
$pathstring
Path relative to the network home URL. Blank string if no path is specified.
$orig_schemestring|null
Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null.

Source

return apply_filters( 'network_home_url', $url, $path, $orig_scheme );

Changelog

Version Description
3.0.0 Introduced.