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中包括子目錄。

過濾搜尋網站時要考慮的路徑段的數量。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );

常見問題

FAQs
檢視更多 >