钩子文档

network_admin_url

💡 云策文档标注

概述

network_admin_url 是一个 WordPress 过滤器,用于修改网络管理区域的 URL。它允许开发者自定义 URL 的路径和方案。

关键要点

  • 过滤器名称:network_admin_url
  • 参数:$url(完整的网络管理 URL,包括方案和路径)、$path(相对于网络管理 URL 的路径,默认为空字符串)、$scheme(方案,可选 'http'、'https'、'admin' 或 null,默认 'admin')
  • 返回:应用过滤器后的 URL
  • 相关函数:network_admin_url(),用于检索网络管理区域的 URL
  • 版本历史:5.8.0 添加 $scheme 参数,3.0.0 引入

📄 原文内容

Filters the network admin URL.

Parameters

$urlstring
The complete network admin URL including scheme and path.
$pathstring
Path relative to the network admin URL. Blank string if no path is specified.
$schemestring|null
The scheme to use. Accepts 'http', 'https', 'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl() .

Source

return apply_filters( 'network_admin_url', $url, $path, $scheme );

Changelog

Version Description
5.8.0 The $scheme parameter was added.
3.0.0 Introduced.