diff --git src/wp-signup.php src/wp-signup.php
index cbc4ddb..ae6536f 100644
|
|
if ( 'none' === $active_signup ) { |
983 | 983 | } |
984 | 984 | |
985 | 985 | if ( $newblogname ) { |
986 | | $newblog = get_blogaddress_by_name( $newblogname ); |
987 | | |
988 | | if ( 'blog' === $active_signup || 'all' === $active_signup ) { |
989 | | printf( |
990 | | /* translators: %s: Site address. */ |
991 | | '<p>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</p>', |
992 | | '<strong>' . $newblog . '</strong>' |
993 | | ); |
| 986 | $current_network = get_network(); |
| 987 | $home_url = get_home_url(); |
| 988 | $host = parse_url( $home_url, PHP_URL_HOST ); |
| 989 | if ( is_subdomain_install() ) { |
| 990 | $host_parts = explode( '.', $host ); |
| 991 | $apex_parts = array_slice( $host_parts, -2 ); |
| 992 | $domain = $newblogname . $apex_parts[0] . $apex_parts[1]; |
| 993 | $path = $current_network->path; |
994 | 994 | } else { |
995 | | printf( |
996 | | /* translators: %s: Site address. */ |
997 | | '<p>' . __( 'The site you were looking for, %s, does not exist.' ) . '</p>', |
998 | | '<strong>' . $newblog . '</strong>' |
999 | | ); |
| 995 | $domain = $host; |
| 996 | $path = $current_network->path . $newblogname . '/'; |
| 997 | } |
| 998 | if ( ! domain_exists( $domain, $path, $current_network->id ) ) { |
| 999 | $newblog = get_blogaddress_by_name( $newblogname ); |
| 1000 | |
| 1001 | if ( 'blog' === $active_signup || 'all' === $active_signup ) { |
| 1002 | printf( |
| 1003 | /* translators: %s: Site address. */ |
| 1004 | '<p>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</p>', |
| 1005 | '<strong>' . $newblog . '</strong>' |
| 1006 | ); |
| 1007 | } else { |
| 1008 | printf( |
| 1009 | /* translators: %s: Site address. */ |
| 1010 | '<p>' . __( 'The site you were looking for, %s, does not exist.' ) . '</p>', |
| 1011 | '<strong>' . $newblog . '</strong>' |
| 1012 | ); |
| 1013 | } |
1000 | 1014 | } |
1001 | 1015 | } |
1002 | 1016 | break; |