Changeset 38681 for trunk/src/wp-includes/ms-load.php
- Timestamp:
- 09/30/2016 04:09:45 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ms-load.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-load.php
r38515 r38681 138 138 * 139 139 * @since 3.9.0 140 * @since 4.7.0 Updated to always return a `WP_Site` object. 140 141 * 141 142 * @global wpdb $wpdb WordPress database abstraction object. … … 144 145 * @param string $path Path to check. 145 146 * @param int|null $segments Path segments to use. Defaults to null, or the full path. 146 * @return object|false Site object if successful. False when no site is found.147 * @return WP_Site|false Site object if successful. False when no site is found. 147 148 */ 148 149 function get_site_by_path( $domain, $path, $segments = null ) { … … 187 188 * @since 3.9.0 188 189 * 189 * @param null|bool| object$site Site value to return by path.190 * @param string $domain The requested domain.191 * @param string $path The requested path, in full.192 * @param int|null $segments The suggested number of paths to consult.193 * Default null, meaning the entire path was to be consulted.194 * @param array $paths The paths to search for, based on $path and $segments.190 * @param null|bool|WP_Site $site Site value to return by path. 191 * @param string $domain The requested domain. 192 * @param string $path The requested path, in full. 193 * @param int|null $segments The suggested number of paths to consult. 194 * Default null, meaning the entire path was to be consulted. 195 * @param array $paths The paths to search for, based on $path and $segments. 195 196 */ 196 197 $pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths ); 197 198 if ( null !== $pre ) { 199 if ( false !== $pre && ! $pre instanceof WP_Site ) { 200 $pre = new WP_Site( $pre ); 201 } 198 202 return $pre; 199 203 }
Note: See TracChangeset
for help on using the changeset viewer.