network_by_path_segments_count WordPress Filter Hook

The network_by_path_segments_count hook allows you to specify the number of segments that a network should have. This can be useful if you want to limit the number of networks that can be created.

apply_filters( 'network_by_path_segments_count', int|null $segments, string $domain, string $path ) #

Filters the number of path segments to consider when searching for a site.


Parameters

$segments

(int|null)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.

$domain

(string)The requested domain.

$path

(string)The requested path, in full.


Top ↑

Source

File: wp-includes/class-wp-network.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.