Make WordPress Core

Changeset 28643


Ignore:
Timestamp:
05/30/2014 10:00:45 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Display the site scheme, not the current scheme on Edit Site screen in network admin.

props johnbillion.
fixes #28406.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-info.php

    r28497 r28643  
    4343    wp_die( __( 'You do not have permission to access this page.' ) );
    4444
     45$parsed = parse_url( $details->siteurl );
    4546$is_main_site = is_main_site( $id );
    4647
     
    123124        <tr class="form-field form-required">
    124125            <th scope="row"><?php _e( 'Domain' ) ?></th>
    125             <?php
    126             $protocol = is_ssl() ? 'https://' : 'http://';
    127             if ( $is_main_site ) { ?>
    128             <td><code><?php echo $protocol; echo esc_attr( $details->domain ) ?></code></td>
     126            <?php if ( $is_main_site ) { ?>
     127                <td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td>
    129128            <?php } else { ?>
    130             <td><?php echo $protocol; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td>
     129                <td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td>
    131130            <?php } ?>
    132131        </tr>
Note: See TracChangeset for help on using the changeset viewer.