allow_subdomain_install example

<?php echo esc_html( $title ); ?></h1> <?php if ( $_POST ) {

    check_admin_referer( 'install-network-1' );

    require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    // Create network tables.     install_network();
    $base              = parse_url( trailingslashit( get_option( 'home' ) ), PHP_URL_PATH );
    $subdomain_install = allow_subdomain_install() ? ! empty( $_POST['subdomain_install'] ) : false;
    if ( ! network_domain_check() ) {
        $result = populate_network( 1, get_clean_basedomain()sanitize_email( $_POST['email'] )wp_unslash( $_POST['sitename'] )$base$subdomain_install );
        if ( is_wp_error( $result ) ) {
            if ( 1 === count( $result->get_error_codes() ) && 'no_wildcard_dns' === $result->get_error_code() ) {
                network_step2( $result );
            } else {
                network_step1( $result );
            }
        } else {
            network_step2();
        }
    }
printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __( 'If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.' ),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }

    if ( allow_subdomain_install() && allow_subdirectory_install() ) :
        ?> <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3> <p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.' ); ?> <strong><?php _e( 'You cannot change this later.' ); ?></strong></p> <p><?php _e( 'You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.' ); ?></p> <?php // @todo Link to an MS readme? ?> <table class="form-table" role="presentation"> <tr> <th><label><input type="radio" name="subdomain_install" value="1"<?php checked( $subdomain_install ); ?> /> <?php _e( 'Sub-domains' ); ?></label></th> <td> <?php
Home | Imprint | This part of the site doesn't use cookies.