Changeset 25421 for trunk/src/wp-admin/includes/update.php
- Timestamp:
- 09/13/2013 06:18:16 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/update.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update.php
r25307 r25421 58 58 } 59 59 60 /** 61 * Gets the best available (and enabled) Auto-Update for WordPress Core. 62 * 63 * If there's 1.2.3 and 1.3 on offer, it'll choose 1.3 if the install allows it, else, 1.2.3 64 * 65 * @since 3.7.0 66 * 67 * @return bool|array False on failure, otherwise the core update offering. 68 */ 69 function find_core_auto_update() { 70 $updates = get_site_transient( 'update_core' ); 71 if ( ! $updates || empty( $updates->updates ) ) 72 return false; 73 74 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 75 76 $auto_update = false; 77 foreach ( $updates->updates as $update ) { 78 if ( 'autoupdate' != $update->response ) 79 continue; 80 81 if ( ! WP_Automatic_Upgrader::should_auto_update( 'core', $update, ABSPATH ) ) 82 continue; 83 84 if ( ! $auto_update || version_compare( $update->current, $auto_update->current, '>' ) ) 85 $auto_update = $update; 86 } 87 return $auto_update; 88 } 89 60 90 function dismiss_core_update( $update ) { 61 91 $dismissed = get_site_option( 'dismissed_update_core' );
Note: See TracChangeset
for help on using the changeset viewer.