Ticket #37053: 37053.diff
File 37053.diff, 1.9 KB (added by , 9 years ago) |
---|
-
src/wp-includes/ms-load.php
161 161 * @param string $domain Domain to check. 162 162 * @param string $path Path to check. 163 163 * @param int|null $segments Path segments to use. Defaults to null, or the full path. 164 * @return object|false Site object if successful. False when no site is found.164 * @return WP_Site|false Site object if successful. False when no site is found. 165 165 */ 166 166 function get_site_by_path( $domain, $path, $segments = null ) { 167 167 $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) ); … … 204 204 * 205 205 * @since 3.9.0 206 206 * 207 * @param null|bool| object$site Site value to return by path.208 * @param string $domain The requested domain.209 * @param string $path The requested path, in full.210 * @param int|null $segments The suggested number of paths to consult.211 * Default null, meaning the entire path was to be consulted.212 * @param array $paths The paths to search for, based on $path and $segments.207 * @param null|bool|WP_Site $site Site value to return by path. 208 * @param string $domain The requested domain. 209 * @param string $path The requested path, in full. 210 * @param int|null $segments The suggested number of paths to consult. 211 * Default null, meaning the entire path was to be consulted. 212 * @param array $paths The paths to search for, based on $path and $segments. 213 213 */ 214 214 $pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths ); 215 215 if ( null !== $pre ) { 216 if ( false !== $pre && ! $pre instanceof WP_Site ) { 217 $pre = new WP_Site( $pre ); 218 } 216 219 return $pre; 217 220 } 218 221