Making WordPress.org


Ignore:
Timestamp:
06/09/2015 01:43:00 PM (10 years ago)
Author:
kovshenin
Message:

WordCamp.org: Set https scheme when creating new sites via central.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php

    r1571 r1651  
    4747                    </label>
    4848
    49                     <span class="description">(e.g., http://city.wordcamp.org/<?php echo esc_html( date( 'Y' ) ); ?>)</span>
     49                    <span class="description">(e.g., https://city.wordcamp.org/<?php echo esc_html( date( 'Y' ) ); ?>)</span>
    5050                <?php endif; // domain_exists ?>
    5151            <?php endif; // current_user_can ?>
     
    7373        if ( 'URL' == $key && 'wc-url' == $field_type && isset( $_POST[ $field_name ] ) ) {
    7474            $url = strtolower( substr( $_POST[ $field_name ], 0, 4 ) ) == 'http' ? $_POST[ $field_name ] : 'http://' . $_POST[ $field_name ];
     75            $url = set_url_scheme( esc_url_raw( $url ), 'https' );
    7576            update_post_meta( $wordcamp_id, $key, esc_url( $url ) );
    7677
     
    172173        update_option( 'close_comments_days_old',      30 );
    173174        update_option( 'wccsp_settings',               $coming_soon_settings );
     175
     176        // Make sure the new blog is https.
     177        update_option( 'siteurl', set_url_scheme( get_option( 'siteurl' ), 'https' ) );
     178        update_option( 'home', set_url_scheme( get_option( 'home' ), 'https' ) );
    174179    }
    175180
Note: See TracChangeset for help on using the changeset viewer.