Filters the number of path segments to consider when searching for a site.
$segmentsint|null$domainstring$pathstringwp-includes/ms-load.php:177get_site_by_path() * @param 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. * @param string $domain The requested domain. * @param string $path The requested path, in full. */ $segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path ); if ( null !== $segments && count( $path_segments ) > $segments ) { $path_segments = array_slice( $path_segments, 0, $segments ); } $paths = array();Introduced in 3.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.