get_network_by_path( string $domain, string $path, int|null $segments = null )

Retrieve the closest matching network for a domain and path.

Parameters Parameters


(string) (Required) Domain to check.


(string) (Required) Path to check.


(int|null) (Optional) Path segments to use. Defaults to null, or the full path.

Default value: null

Top ↑

Return Return

(WP_Network|false) Network object if successful. False when no network is found.

Top ↑

Source Source

File: wp-includes/ms-load.php

function get_network_by_path( $domain, $path, $segments = null ) {
	return WP_Network::get_by_path( $domain, $path, $segments );

Top ↑

Changelog Changelog

Version Description
3.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.