Changeset 50131 for trunk/src/wp-admin/site-health.php
- Timestamp:
- 02/02/2021 12:08:01 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/site-health.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/site-health.php
r49537 r50131 15 15 require_once __DIR__ . '/admin.php'; 16 16 17 wp_reset_vars( array( 'action' ) ); 18 17 19 $title = __( 'Site Health Status' ); 18 20 … … 26 28 if ( ! class_exists( 'WP_Site_Health' ) ) { 27 29 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php'; 30 } 31 32 if ( 'update_https' === $action ) { 33 check_admin_referer( 'wp_update_https' ); 34 35 if ( ! current_user_can( 'update_https' ) ) { 36 wp_die( __( 'Sorry, you are not allowed to update this site to HTTPS.' ), 403 ); 37 } 38 39 if ( ! wp_is_https_supported() ) { 40 wp_die( __( 'It looks like HTTPS is not supported for your website at this point.' ) ); 41 } 42 43 $result = wp_update_urls_to_https(); 44 45 wp_redirect( add_query_arg( 'https_updated', (int) $result, wp_get_referer() ) ); 46 exit; 28 47 } 29 48 … … 41 60 </h1> 42 61 </div> 62 63 <?php 64 if ( isset( $_GET['https_updated'] ) ) { 65 if ( $_GET['https_updated'] ) { 66 ?> 67 <div id="message" class="notice notice-success is-dismissible"><p><?php _e( 'Site URLs switched to HTTPS.' ); ?></p></div> 68 <?php 69 } else { 70 ?> 71 <div id="message" class="notice notice-error is-dismissible"><p><?php _e( 'Site URLs could not be switched to HTTPS.' ); ?></p></div> 72 <?php 73 } 74 } 75 ?> 43 76 44 77 <div class="health-check-title-section site-health-progress-wrapper loading hide-if-no-js">
Note: See TracChangeset
for help on using the changeset viewer.