From 1d2db9eade2347a8805bd4b31c7c5e662ca58382 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 12 Oct 2016 01:09:29 +0000 Subject: [PATCH] Multisite: Clarify that `get_site_by_path()` does not return exact matches. Props stevenlinx. Fixes #38152. git-svn-id: https://develop.svn.wordpress.org/trunk@38781 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-load.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/ms-load.php b/src/wp-includes/ms-load.php index 06673f65ac..a516327399 100644 --- a/src/wp-includes/ms-load.php +++ b/src/wp-includes/ms-load.php @@ -134,7 +134,14 @@ function get_network_by_path( $domain, $path, $segments = null ) { } /** - * Retrieve a site object by its domain and path. + * Retrieves the closest matching site object by its domain and path. + * + * This will not necessarily return an exact match for a domain and path. Instead, it + * breaks the domain and path into pieces that are then used to match the closest + * possibility from a query. + * + * The intent of this method is to match a site object during bootstrap for a + * requested site address * * @since 3.9.0 * @since 4.7.0 Updated to always return a `WP_Site` object.