On this page
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
$segmentsint|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.
$domainstring-
The requested domain.
$pathstring-
The requested path, in full.
Source
File: wp-includes/class-wp-network.php. View all references
$segments = apply_filters( 'network_by_path_segments_count', $segments, $domain, $path );
Related
Used By
| Used By | Description |
|---|---|
| WP_Network::get_by_path() wp-includes/class-wp-network.php | Retrieves the closest matching network for a domain and path. |
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/network_by_path_segments_count