Make WordPress Core

Ticket #53355: 53355.diff

File 53355.diff, 1.6 KB (added by henry.wright, 2 years ago)
  • src/wp-signup.php

    diff --git src/wp-signup.php src/wp-signup.php
    index cbc4ddb..20e7bb4 100644
    if ( 'none' === $active_signup ) { 
    983983                        }
    984984
    985985                        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                                if ( is_subdomain_install() ) {
     988                                        $path = $current_network->path;
    994989                                } 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                                         );
     990                                        $path = $current_network->path . $newblogname . '/';
     991                                }
     992                                if ( ! domain_exists( $newblogname, $path, $current_network->id ) ) {
     993                                        $newblog = get_blogaddress_by_name( $newblogname );
     994
     995                                        if ( 'blog' === $active_signup || 'all' === $active_signup ) {
     996                                                printf(
     997                                                        /* translators: %s: Site address. */
     998                                                        '<p>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</p>',
     999                                                        '<strong>' . $newblog . '</strong>'
     1000                                                );
     1001                                        } else {
     1002                                                printf(
     1003                                                        /* translators: %s: Site address. */
     1004                                                        '<p>' . __( 'The site you were looking for, %s, does not exist.' ) . '</p>',
     1005                                                        '<strong>' . $newblog . '</strong>'
     1006                                                );
     1007                                        }
    10001008                                }
    10011009                        }
    10021010                        break;