pre_get_site_by_path

pre_get_site_by_path

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

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('pre_get_site_by_path') is found 1 times:

  • /wp-includes/ms-load.php line 212
    	 * @param int|null           $segments The suggested number of paths to consult.
    	 *                                     Default null, meaning the entire path was to be consulted.
    	 * @param string[]           $paths    The paths to search for, based on $path and $segments.
    	 */
    	$pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
    	if ( null !== $pre ) {
    		if ( false !== $pre && ! $pre instanceof WP_Site ) {
    			$pre = new WP_Site( $pre );
    		}
    		return $pre;
    	}