Changeset 10515 for trunk/wp-includes/update.php
- Timestamp:
- 02/06/2009 06:06:20 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/update.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/update.php
r10238 r10515 27 27 $php_version = phpversion(); 28 28 29 $current = get_ option( 'update_core' );29 $current = get_transient( 'update_core' ); 30 30 if ( ! is_object($current) ) 31 31 $current = new stdClass; … … 41 41 // Update last_checked for current to prevent multiple blocking requests if request hangs 42 42 $current->last_checked = time(); 43 update_option( 'update_core', $current );43 set_transient( 'update_core', $current ); 44 44 45 45 if ( method_exists( $wpdb, 'db_version' ) ) … … 85 85 $updates->last_checked = time(); 86 86 $updates->version_checked = $wp_version; 87 update_option( 'update_core', $updates);87 set_transient( 'update_core', $updates); 88 88 } 89 89 add_action( 'init', 'wp_version_check' ); … … 114 114 $plugins = get_plugins(); 115 115 $active = get_option( 'active_plugins' ); 116 $current = get_ option( 'update_plugins' );116 $current = get_transient( 'update_plugins' ); 117 117 if ( ! is_object($current) ) 118 118 $current = new stdClass; … … 146 146 // Update last_checked for current to prevent multiple blocking requests if request hangs 147 147 $current->last_checked = time(); 148 update_option( 'update_plugins', $current );148 set_transient( 'update_plugins', $current ); 149 149 150 150 $to_send = (object)compact('plugins', 'active'); … … 171 171 $new_option->response = array(); 172 172 173 update_option( 'update_plugins', $new_option );173 set_transient( 'update_plugins', $new_option ); 174 174 } 175 175 … … 197 197 198 198 $installed_themes = get_themes( ); 199 $current_theme = get_ option( 'update_themes' );199 $current_theme = get_transient( 'update_themes' ); 200 200 if ( ! is_object($current_theme) ) 201 201 $current_theme = new stdClass; … … 211 211 // Update last_checked for current to prevent multiple blocking requests if request hangs 212 212 $current_theme->last_checked = time(); 213 update_option( 'update_themes', $current_theme );213 set_transient( 'update_themes', $current_theme ); 214 214 215 215 $themes = array( ); … … 241 241 $new_option->response = $response; 242 242 243 update_option( 'update_themes', $new_option );243 set_transient( 'update_themes', $new_option ); 244 244 } 245 245 … … 255 255 */ 256 256 function _maybe_update_plugins() { 257 $current = get_ option( 'update_plugins' );257 $current = get_transient( 'update_plugins' ); 258 258 if ( isset( $current->last_checked ) && 43200 > ( time() - $current->last_checked ) ) 259 259 return; … … 271 271 */ 272 272 function _maybe_update_themes( ) { 273 $current = get_ option( 'update_themes' );273 $current = get_transient( 'update_themes' ); 274 274 if( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) ) 275 275 return;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)