equal
deleted
inserted
replaced
152 * The intent of this method is to match a site object during bootstrap for a |
152 * The intent of this method is to match a site object during bootstrap for a |
153 * requested site address |
153 * requested site address |
154 * |
154 * |
155 * @since 3.9.0 |
155 * @since 3.9.0 |
156 * @since 4.7.0 Updated to always return a `WP_Site` object. |
156 * @since 4.7.0 Updated to always return a `WP_Site` object. |
157 * |
|
158 * @global wpdb $wpdb WordPress database abstraction object. |
|
159 * |
157 * |
160 * @param string $domain Domain to check. |
158 * @param string $domain Domain to check. |
161 * @param string $path Path to check. |
159 * @param string $path Path to check. |
162 * @param int|null $segments Path segments to use. Defaults to null, or the full path. |
160 * @param int|null $segments Path segments to use. Defaults to null, or the full path. |
163 * @return WP_Site|false Site object if successful. False when no site is found. |
161 * @return WP_Site|false Site object if successful. False when no site is found. |
407 * At the time of this action, the only recourse is to redirect somewhere |
405 * At the time of this action, the only recourse is to redirect somewhere |
408 * and exit. If you want to declare a particular site, do so earlier. |
406 * and exit. If you want to declare a particular site, do so earlier. |
409 * |
407 * |
410 * @since 3.9.0 |
408 * @since 3.9.0 |
411 * |
409 * |
412 * @param object $current_site The network that had been determined. |
410 * @param WP_Network $current_site The network that had been determined. |
413 * @param string $domain The domain used to search for a site. |
411 * @param string $domain The domain used to search for a site. |
414 * @param string $path The path used to search for a site. |
412 * @param string $path The path used to search for a site. |
415 */ |
413 */ |
416 do_action( 'ms_site_not_found', $current_site, $domain, $path ); |
414 do_action( 'ms_site_not_found', $current_site, $domain, $path ); |
417 |
415 |
418 if ( $subdomain && ! defined( 'NOBLOGREDIRECT' ) ) { |
416 if ( $subdomain && ! defined( 'NOBLOGREDIRECT' ) ) { |
419 // For a "subdomain" installation, redirect to the signup form specifically. |
417 // For a "subdomain" installation, redirect to the signup form specifically. |
517 * |
515 * |
518 * @access private |
516 * @access private |
519 * @since 3.0.0 |
517 * @since 3.0.0 |
520 * @deprecated 3.9.0 Use get_current_site() instead. |
518 * @deprecated 3.9.0 Use get_current_site() instead. |
521 * |
519 * |
522 * @param object $current_site |
520 * @param WP_Network $current_site |
523 * @return object |
521 * @return WP_Network |
524 */ |
522 */ |
525 function get_current_site_name( $current_site ) { |
523 function get_current_site_name( $current_site ) { |
526 _deprecated_function( __FUNCTION__, '3.9.0', 'get_current_site()' ); |
524 _deprecated_function( __FUNCTION__, '3.9.0', 'get_current_site()' ); |
527 return $current_site; |
525 return $current_site; |
528 } |
526 } |
535 * |
533 * |
536 * @access private |
534 * @access private |
537 * @since 3.0.0 |
535 * @since 3.0.0 |
538 * @deprecated 3.9.0 |
536 * @deprecated 3.9.0 |
539 * |
537 * |
540 * @global object $current_site |
538 * @global WP_Network $current_site |
541 * |
539 * |
542 * @return object |
540 * @return WP_Network |
543 */ |
541 */ |
544 function wpmu_current_site() { |
542 function wpmu_current_site() { |
545 global $current_site; |
543 global $current_site; |
546 _deprecated_function( __FUNCTION__, '3.9.0' ); |
544 _deprecated_function( __FUNCTION__, '3.9.0' ); |
547 return $current_site; |
545 return $current_site; |