site_by_path_segments_count

site_by_path_segments_count

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('site_by_path_segments_count') is found 1 times:

  • /wp-includes/ms-load.php line 177
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    *                           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();