Changeset 12673 for trunk/wp-admin/includes/update.php
- Timestamp:
- 01/08/2010 08:49:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r12066 r12673 32 32 function get_core_updates( $options = array() ) { 33 33 $options = array_merge( array('available' => true, 'dismissed' => false ), $options ); 34 $dismissed = get_ option( 'dismissed_update_core' );34 $dismissed = get_site_option( 'dismissed_update_core' ); 35 35 if ( !is_array( $dismissed ) ) $dismissed = array(); 36 $from_api = get_ transient( 'update_core' );36 $from_api = get_site_transient( 'update_core' ); 37 37 if ( empty($from_api) ) 38 38 return false; … … 58 58 59 59 function dismiss_core_update( $update ) { 60 $dismissed = get_ option( 'dismissed_update_core' );60 $dismissed = get_site_option( 'dismissed_update_core' ); 61 61 $dismissed[ $update->current.'|'.$update->locale ] = true; 62 return update_ option( 'dismissed_update_core', $dismissed );62 return update_site_option( 'dismissed_update_core', $dismissed ); 63 63 } 64 64 65 65 function undismiss_core_update( $version, $locale ) { 66 $dismissed = get_ option( 'dismissed_update_core' );66 $dismissed = get_site_option( 'dismissed_update_core' ); 67 67 $key = $version.'|'.$locale; 68 68 if ( !isset( $dismissed[$key] ) ) return false; 69 69 unset( $dismissed[$key] ); 70 return update_ option( 'dismissed_update_core', $dismissed );70 return update_site_option( 'dismissed_update_core', $dismissed ); 71 71 } 72 72 73 73 function find_core_update( $version, $locale ) { 74 $from_api = get_ transient( 'update_core' );74 $from_api = get_site_transient( 'update_core' ); 75 75 if ( !is_array( $from_api->updates ) ) return false; 76 76 $updates = $from_api->updates; … … 149 149 $all_plugins = get_plugins(); 150 150 $upgrade_plugins = array(); 151 $current = get_ transient( 'update_plugins' );151 $current = get_site_transient( 'update_plugins' ); 152 152 foreach ( (array)$all_plugins as $plugin_file => $plugin_data) { 153 153 if ( isset( $current->response[ $plugin_file ] ) ) { … … 161 161 162 162 function wp_plugin_update_rows() { 163 $plugins = get_ transient( 'update_plugins' );163 $plugins = get_site_transient( 'update_plugins' ); 164 164 if ( isset($plugins->response) && is_array($plugins->response) ) { 165 165 $plugins = array_keys( $plugins->response ); … … 172 172 173 173 function wp_plugin_update_row( $file, $plugin_data ) { 174 $current = get_ transient( 'update_plugins' );174 $current = get_site_transient( 'update_plugins' ); 175 175 if ( !isset( $current->response[ $file ] ) ) 176 176 return false; … … 208 208 function get_theme_updates() { 209 209 $themes = get_themes(); 210 $current = get_ transient('update_themes');210 $current = get_site_transient('update_themes'); 211 211 $update_themes = array(); 212 212
Note: See TracChangeset
for help on using the changeset viewer.