Changeset 25833
- Timestamp:
- 10/17/2013 08:28:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/about.php
r25832 r25833 41 41 <h4><?php _e( 'Updates While You Sleep' ); ?></h4> 42 42 <p><?php _e( 'With WordPress 3.7, you don’t have to lift a finger to apply maintenance and security updates. Most sites are now able to automatically apply these updates in the background, though some configurations may not allow it.' ); ?></p> 43 <p><?php _e( '→ This site <strong>is</strong> able to apply these updates automatically. Cool!' ); ?></p> 44 <p><?php printf( __( '→ This site <strong>is not</strong> able to apply these updates automatically. But we’ll email %s when there is a new security release.' ), esc_html( get_site_option( 'admin_email' ) ) ); ?></p> 43 <?php 44 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 45 $upgrader = new WP_Automatic_Upgrader; 46 47 $can_auto_update = wp_http_supports( 'ssl' ); 48 if ( $can_auto_update ) { 49 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 50 $upgrader = new WP_Automatic_Upgrader; 51 $future_minor_update = (object) array( 52 'current' => $wp_version . '.1-about.php', 53 'version' => $wp_version . '.1-about.php', 54 'php_version' => $required_php_version, 55 'mysql_version' => $required_mysql_version, 56 ); 57 $can_auto_update = $upgrader->should_upgrade( 'core', $future_minor_update, ABSPATH ); 58 } 59 if ( $can_auto_update ) : ?> 60 <p><?php _e( '→ This site <strong>is</strong> able to apply these updates automatically. Cool!' ); ?></p> 61 <?php else : ?> 62 <p><?php printf( __( '→ This site <strong>is not</strong> able to apply these updates automatically. But we’ll email %s when there is a new security release.' ), esc_html( get_site_option( 'admin_email' ) ) ); ?></p> 63 <?php endif; ?> 45 64 </div> 46 65 <div class="last-feature">
Note: See TracChangeset
for help on using the changeset viewer.