network_by_path_segments_count

过滤钩子
apply_filters( 'network_by_path_segments_count', $segments, $domain, $path )
参数
  • (int|null) $segments The number of path segments to consider. WordPress by default looks at one path segment. The function default of null only makes sense when you know the requested path should match a network.
    Required:
  • (string) $domain The requested domain.
    Required:
  • (string) $path The requested path, in full.
    Required:
定义位置
相关勾子
site_by_path_segments_countnetwork_allowed_themesnetwork_admin_menunetwork_home_urlpre_get_network_by_path
相关方法
get_network_by_pathwp_update_comment_countget_attachment_iconnetwork_home_urlget_comment_countnetwork_admin_url
引入
3.9.0
弃用
-

network_by_path_segments_count: 这是一个函数,用于返回与特定路径相关的网络,由URL中的路径段数量定义。

过滤搜索站点时要考虑的路径段数。

$segments = apply_filters( 'network_by_path_segments_count', $segments, $domain, $path );

常见问题

FAQs
查看更多 >