site_by_path_segments_count

过滤钩子
apply_filters( 'site_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 following the network path. The function default of null only makes sense when you know the requested path should match a site.
    Required:
  • (string) $domain The requested domain.
    Required:
  • (string) $path The requested path, in full.
    Required:
定义位置
相关勾子
network_by_path_segments_countsite_health_tab_contentsite_icon_attachment_metadatasite_allowed_themessite_health_navigation_tabs
相关方法
update_posts_countget_attachment_iconget_site_by_pathget_user_counttranslate_with_gettext_contextget_attachment_icon_src
引入
3.9.0
弃用
-

site_by_path_segments_count过滤器。site_by_path_segments_count过滤器是一个WordPress过滤器,它允许修改用于确定多站点网络中一个站点的URL的段数。这个过滤器可以用来改变URL中使用的段数,例如,在URL中包括子目录。

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

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

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-14 15:36:34

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

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

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