<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12673] trunk: Convert update_themes, update_plugins, update_core,
and dismissed_update_core into site transients/plugins.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12673">12673</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-08 20:49:55 +0000 (Fri, 08 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Convert update_themes, update_plugins, update_core, and dismissed_update_core into site transients/plugins. Remove no longer need compat code.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesclasswpupgraderphp">trunk/wp-admin/includes/class-wp-upgrader.php</a></li>
<li><a href="#trunkwpadminincludesplugininstallphp">trunk/wp-admin/includes/plugin-install.php</a></li>
<li><a href="#trunkwpadminincludespluginphp">trunk/wp-admin/includes/plugin.php</a></li>
<li><a href="#trunkwpadminincludesthemeinstallphp">trunk/wp-admin/includes/theme-install.php</a></li>
<li><a href="#trunkwpadminincludesthemephp">trunk/wp-admin/includes/theme.php</a></li>
<li><a href="#trunkwpadminincludesupdatecorephp">trunk/wp-admin/includes/update-core.php</a></li>
<li><a href="#trunkwpadminincludesupdatephp">trunk/wp-admin/includes/update.php</a></li>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminthemesphp">trunk/wp-admin/themes.php</a></li>
<li><a href="#trunkwpadminupgradephp">trunk/wp-admin/upgrade.php</a></li>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwpincludesupdatephp">trunk/wp-includes/update.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesclasswpupgraderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-upgrader.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-upgrader.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/class-wp-upgrader.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx">                                         ));
</span><span class="cx">
</span><span class="cx">                 // Force refresh of plugin update information
</span><del>-                delete_transient('update_plugins');
</del><ins>+                delete_site_transient('update_plugins');
</ins><span class="cx">
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx">                 $this->init();
</span><span class="cx">                 $this->upgrade_strings();
</span><span class="cx">
</span><del>-                $current = get_transient( 'update_plugins' );
</del><ins>+                $current = get_site_transient( 'update_plugins' );
</ins><span class="cx">                 if ( !isset( $current->response[ $plugin ] ) ) {
</span><span class="cx">                         $this->skin->set_result(false);
</span><span class="cx">                         $this->skin->error('up_to_date');
</span><span class="lines">@@ -440,7 +440,7 @@
</span><span class="cx">                         return $this->result;
</span><span class="cx">
</span><span class="cx">                 // Force refresh of plugin update information
</span><del>-                delete_transient('update_plugins');
</del><ins>+                delete_site_transient('update_plugins');
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         function bulk_upgrade($plugins) {
</span><span class="lines">@@ -449,7 +449,7 @@
</span><span class="cx">                 $this->bulk = true;
</span><span class="cx">                 $this->upgrade_strings();
</span><span class="cx">
</span><del>-                $current = get_transient( 'update_plugins' );
</del><ins>+                $current = get_site_transient( 'update_plugins' );
</ins><span class="cx">
</span><span class="cx">                 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);
</span><span class="cx">
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx">                 remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'));
</span><span class="cx">
</span><span class="cx">                 // Force refresh of plugin update information
</span><del>-                delete_transient('update_plugins');
</del><ins>+                delete_site_transient('update_plugins');
</ins><span class="cx">
</span><span class="cx">                 return $results;
</span><span class="cx">         }
</span><span class="lines">@@ -627,7 +627,7 @@
</span><span class="cx">                         return $this->result;
</span><span class="cx">
</span><span class="cx">                 // Force refresh of theme update information
</span><del>-                delete_transient('update_themes');
</del><ins>+                delete_site_transient('update_themes');
</ins><span class="cx">
</span><span class="cx">                 if ( empty($result['destination_name']) )
</span><span class="cx">                         return false;
</span><span class="lines">@@ -641,7 +641,7 @@
</span><span class="cx">                 $this->upgrade_strings();
</span><span class="cx">
</span><span class="cx">                 // Is an update available?
</span><del>-                $current = get_transient( 'update_themes' );
</del><ins>+                $current = get_site_transient( 'update_themes' );
</ins><span class="cx">                 if ( !isset( $current->response[ $theme ] ) ) {
</span><span class="cx">                         $this->skin->set_result(false);
</span><span class="cx">                         $this->skin->error('up_to_date');
</span><span class="lines">@@ -671,7 +671,7 @@
</span><span class="cx">                         return $this->result;
</span><span class="cx">
</span><span class="cx">                 // Force refresh of theme update information
</span><del>-                delete_transient('update_themes');
</del><ins>+                delete_site_transient('update_themes');
</ins><span class="cx">
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpadminincludesplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/plugin-install.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/plugin-install.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/plugin-install.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -443,7 +443,7 @@
</span><span class="cx">                         //Default to a "new" plugin
</span><span class="cx">                         $type = 'install';
</span><span class="cx">                         //Check to see if this plugin is known to be installed, and has an update awaiting it.
</span><del>-                        $update_plugins = get_transient('update_plugins');
</del><ins>+                        $update_plugins = get_site_transient('update_plugins');
</ins><span class="cx">                         if ( is_object( $update_plugins ) ) {
</span><span class="cx">                                 foreach ( (array)$update_plugins->response as $file => $plugin ) {
</span><span class="cx">                                         if ( $plugin->slug === $api->slug ) {
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">                                                 $newer_version = $installed_plugin[ $key ]['Version'];
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 //If the above update check failed, Then that probably means that the update checker has out-of-date information, force a refresh
</span><del>-                                                delete_transient('update_plugins');
</del><ins>+                                                delete_site_transient('update_plugins');
</ins><span class="cx">                                                 $update_file = $api->slug . '/' . $key; //This code branch only deals with a plugin which is in a folder the same name as its slug, Doesnt support plugins which have 'non-standard' names
</span><span class="cx">                                                 $type = 'update_available';
</span><span class="cx">                                         }
</span></span></pre></div>
<a id="trunkwpadminincludespluginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/plugin.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/plugin.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/plugin.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -467,9 +467,9 @@
</span><span class="cx">                 return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) );
</span><span class="cx">
</span><span class="cx">         // Force refresh of plugin update information
</span><del>-        if ( $current = get_transient('update_plugins') ) {
</del><ins>+        if ( $current = get_site_transient('update_plugins') ) {
</ins><span class="cx">                 unset( $current->response[ $plugin_file ] );
</span><del>-                set_transient('update_plugins', $current);
</del><ins>+                set_site_transient('update_plugins', $current);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="trunkwpadminincludesthemeinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/theme-install.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/theme-install.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/theme-install.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -476,7 +476,7 @@
</span><span class="cx">         // Default to a "new" theme
</span><span class="cx">         $type = 'install';
</span><span class="cx">         // Check to see if this theme is known to be installed, and has an update awaiting it.
</span><del>-        $update_themes = get_transient('update_themes');
</del><ins>+        $update_themes = get_site_transient('update_themes');
</ins><span class="cx">         if ( is_object($update_themes) && isset($update_themes->response) ) {
</span><span class="cx">                 foreach ( (array)$update_themes->response as $theme_slug => $theme_info ) {
</span><span class="cx">                         if ( $theme_slug === $api->slug ) {
</span></span></pre></div>
<a id="trunkwpadminincludesthemephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/theme.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/theme.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/theme.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">                 return new WP_Error('could_not_remove_theme', sprintf(__('Could not fully remove the theme %s'), $template) );
</span><span class="cx">
</span><span class="cx">         // Force refresh of theme update information
</span><del>-        delete_transient('update_themes');
</del><ins>+        delete_site_transient('update_themes');
</ins><span class="cx">
</span><span class="cx">         return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludesupdatecorephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/update-core.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/update-core.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/update-core.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -278,8 +278,8 @@
</span><span class="cx">         $wp_filesystem->delete($from, true);
</span><span class="cx">
</span><span class="cx">         // Force refresh of update information
</span><del>-        if ( function_exists('delete_transient') )
-                delete_transient('update_core');
</del><ins>+        if ( function_exists('delete_site_transient') )
+                delete_site_transient('update_core');
</ins><span class="cx">         else
</span><span class="cx">                 delete_option('update_core');
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminincludesupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/update.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/update.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/includes/update.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -31,9 +31,9 @@
</span><span class="cx"> */
</span><span class="cx"> function get_core_updates( $options = array() ) {
</span><span class="cx">         $options = array_merge( array('available' => true, 'dismissed' => false ), $options );
</span><del>-        $dismissed = get_option( 'dismissed_update_core' );
</del><ins>+        $dismissed = get_site_option( 'dismissed_update_core' );
</ins><span class="cx">         if ( !is_array( $dismissed ) ) $dismissed = array();
</span><del>-        $from_api = get_transient( 'update_core' );
</del><ins>+        $from_api = get_site_transient( 'update_core' );
</ins><span class="cx">         if ( empty($from_api) )
</span><span class="cx">                 return false;
</span><span class="cx">         if ( !isset( $from_api->updates ) || !is_array( $from_api->updates ) ) return false;
</span><span class="lines">@@ -57,21 +57,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function dismiss_core_update( $update ) {
</span><del>-        $dismissed = get_option( 'dismissed_update_core' );
</del><ins>+        $dismissed = get_site_option( 'dismissed_update_core' );
</ins><span class="cx">         $dismissed[ $update->current.'|'.$update->locale ] = true;
</span><del>-        return update_option( 'dismissed_update_core', $dismissed );
</del><ins>+        return update_site_option( 'dismissed_update_core', $dismissed );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function undismiss_core_update( $version, $locale ) {
</span><del>-        $dismissed = get_option( 'dismissed_update_core' );
</del><ins>+        $dismissed = get_site_option( 'dismissed_update_core' );
</ins><span class="cx">         $key = $version.'|'.$locale;
</span><span class="cx">         if ( !isset( $dismissed[$key] ) ) return false;
</span><span class="cx">         unset( $dismissed[$key] );
</span><del>-        return update_option( 'dismissed_update_core', $dismissed );
</del><ins>+        return update_site_option( 'dismissed_update_core', $dismissed );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function find_core_update( $version, $locale ) {
</span><del>-        $from_api = get_transient( 'update_core' );
</del><ins>+        $from_api = get_site_transient( 'update_core' );
</ins><span class="cx">         if ( !is_array( $from_api->updates ) ) return false;
</span><span class="cx">         $updates = $from_api->updates;
</span><span class="cx">         foreach($updates as $update) {
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> function get_plugin_updates() {
</span><span class="cx">         $all_plugins = get_plugins();
</span><span class="cx">         $upgrade_plugins = array();
</span><del>-        $current = get_transient( 'update_plugins' );
</del><ins>+        $current = get_site_transient( 'update_plugins' );
</ins><span class="cx">         foreach ( (array)$all_plugins as $plugin_file => $plugin_data) {
</span><span class="cx">                 if ( isset( $current->response[ $plugin_file ] ) ) {
</span><span class="cx">                         $upgrade_plugins[ $plugin_file ] = (object) $plugin_data;
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wp_plugin_update_rows() {
</span><del>-        $plugins = get_transient( 'update_plugins' );
</del><ins>+        $plugins = get_site_transient( 'update_plugins' );
</ins><span class="cx">         if ( isset($plugins->response) && is_array($plugins->response) ) {
</span><span class="cx">                 $plugins = array_keys( $plugins->response );
</span><span class="cx">                 foreach( $plugins as $plugin_file ) {
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> add_action( 'admin_init', 'wp_plugin_update_rows' );
</span><span class="cx">
</span><span class="cx"> function wp_plugin_update_row( $file, $plugin_data ) {
</span><del>-        $current = get_transient( 'update_plugins' );
</del><ins>+        $current = get_site_transient( 'update_plugins' );
</ins><span class="cx">         if ( !isset( $current->response[ $file ] ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx">
</span><span class="cx"> function get_theme_updates() {
</span><span class="cx">         $themes = get_themes();
</span><del>-        $current = get_transient('update_themes');
</del><ins>+        $current = get_site_transient('update_themes');
</ins><span class="cx">         $update_themes = array();
</span><span class="cx">
</span><span class="cx">         foreach ( $themes as $theme ) {
</span></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/menu.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">         if ( is_super_admin() )
</span><span class="cx">                 $submenu['themes.php'][15] = array(__('Add New Themes'), 'install_themes', 'theme-install.php');
</span><span class="cx">
</span><del>-$update_plugins = get_transient( 'update_plugins' );
</del><ins>+$update_plugins = get_site_transient( 'update_plugins' );
</ins><span class="cx"> $update_count = 0;
</span><span class="cx"> if ( !empty($update_plugins->response) )
</span><span class="cx">         $update_count = count( $update_plugins->response );
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/plugins.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx">                 unset($recently_activated[ $key ]);
</span><span class="cx"> if ( $recently_activated != get_option('recently_activated') ) //If array changed, update it.
</span><span class="cx">         update_option('recently_activated', $recently_activated);
</span><del>-$current = get_transient( 'update_plugins' );
</del><ins>+$current = get_site_transient( 'update_plugins' );
</ins><span class="cx">
</span><span class="cx"> foreach ( (array)$all_plugins as $plugin_file => $plugin_data) {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/themes.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/themes.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/themes.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> function theme_update_available( $theme ) {
</span><span class="cx">         static $themes_update;
</span><span class="cx">         if ( !isset($themes_update) )
</span><del>-                $themes_update = get_transient('update_themes');
</del><ins>+                $themes_update = get_site_transient('update_themes');
</ins><span class="cx">
</span><span class="cx">         if ( is_object($theme) && isset($theme->stylesheet) )
</span><span class="cx">                 $stylesheet = $theme->stylesheet;
</span></span></pre></div>
<a id="trunkwpadminupgradephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upgrade.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upgrade.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-admin/upgrade.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> timer_start();
</span><span class="cx"> require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
</span><span class="cx">
</span><del>-delete_transient('update_core');
</del><ins>+delete_site_transient('update_core');
</ins><span class="cx">
</span><span class="cx"> if ( isset( $_GET['step'] ) )
</span><span class="cx">         $step = $_GET['step'];
</span></span></pre></div>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-includes/ms-functions.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -2088,86 +2088,6 @@
</span><span class="cx">         return strtolower( $username );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-/* Short circuit the update checks. Make sure update informtion is
- stored in wp_sitemeta rather than the options table of individual blogs */
-
-// update_plugins (transient)
-function site_delete_update_plugins() {
-        return update_site_option( 'update_plugins', false );
-}
-add_action( 'delete_transient_update_plugins', 'site_delete_update_plugins' );
-
-function site_pre_update_plugins() {
-        return get_site_option( 'update_plugins' );
-}
-add_filter( 'pre_transient_update_plugins', 'site_pre_update_plugins' );
-
-function site_pre_set_transient_update_plugins( $value ) {
-        update_site_option( 'update_plugins', $value );
-        return $value;
-}
-add_filter( 'pre_set_transient_update_plugins', 'site_pre_set_transient_update_plugins' );
-
-add_action( 'add_option__transient_update_plugins', 'site_add_option__transient_update');
-
-// update_themes (transient)
-function site_delete_update_themes() {
-        return update_site_option( 'update_themes', false );
-}
-add_action( 'delete_transient_update_themes', 'site_delete_update_themes' );
-
-function site_pre_update_themes() {
-        return get_site_option( 'update_themes' );
-}
-add_filter( 'pre_transient_update_themes', 'site_pre_update_themes' );
-
-function site_pre_set_transient_update_themes( $value ) {
-        update_site_option( 'update_themes', $value );
-        return $value;
-}
-add_filter( 'pre_set_transient_update_themes', 'site_pre_set_transient_update_themes' );
-
-add_action( 'add_option__transient_update_themes', 'site_add_option__transient_update');
-
-// update_core (transient)
-function site_delete_update_core() {
-        return update_site_option( 'update_core', false );
-}
-add_action( 'delete_transient_update_core', 'site_delete_update_core' );
-
-function site_pre_update_core() {
-        return get_site_option( 'update_core' );
-}
-add_filter( 'pre_transient_update_core', 'site_pre_update_core' );
-
-function site_pre_set_transient_update_core( $value ) {
-        update_site_option( 'update_core', $value );
-        return $value;
-}
-add_filter( 'pre_set_transient_update_core', 'site_pre_set_transient_update_core' );
-
-add_action( 'add_option__transient_update_core', 'site_add_option__transient_update');
-
-// dismissed_update_core (option, not a transient)
-function site_pre_dismissed_update_core() {
-        return get_site_option( 'dismissed_update_core' );
-}
-add_filter( 'pre_option_dismissed_update_core', 'site_pre_dismissed_update_core' );
-
-function site_pre_update_option_dismissed_update_core( $newvalue, $oldvalue ) {
-        update_site_option( 'dismissed_update_core', $newvalue );
-        delete_option('dismissed_update_core');
-        // Return the old value so the update_option() call is aborted after this filter is run. It's in sitemeta now.
-        return $oldvalue;
-}
-add_filter( 'pre_update_option_dismissed_update_core', 'site_pre_update_option_dismissed_update_core', 10, 2 );
-
-
-
-function site_add_option__transient_update($name) {
-        delete_option($name);
-}
-
</del><span class="cx"> /* Redirect all hits to "dashboard" blog to wp-admin/ Dashboard. */
</span><span class="cx"> function redirect_mu_dashboard() {
</span><span class="cx">         global $current_site, $current_blog;
</span></span></pre></div>
<a id="trunkwpincludesupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/update.php (12672 => 12673)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/update.php        2010-01-08 20:29:56 UTC (rev 12672)
+++ trunk/wp-includes/update.php        2010-01-08 20:49:55 UTC (rev 12673)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">         global $wp_version, $wpdb, $wp_local_package;
</span><span class="cx">         $php_version = phpversion();
</span><span class="cx">
</span><del>-        $current = get_transient( 'update_core' );
</del><ins>+        $current = get_site_transient( 'update_core' );
</ins><span class="cx">         if ( ! is_object($current) ) {
</span><span class="cx">                 $current = new stdClass;
</span><span class="cx">                 $current->updates = array();
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">
</span><span class="cx">         // Update last_checked for current to prevent multiple blocking requests if request hangs
</span><span class="cx">         $current->last_checked = time();
</span><del>-        set_transient( 'update_core', $current );
</del><ins>+        set_site_transient( 'update_core', $current );
</ins><span class="cx">
</span><span class="cx">         if ( method_exists( $wpdb, 'db_version' ) )
</span><span class="cx">                 $mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version());
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">         $updates->updates = $new_options;
</span><span class="cx">         $updates->last_checked = time();
</span><span class="cx">         $updates->version_checked = $wp_version;
</span><del>-        set_transient( 'update_core', $updates);
</del><ins>+        set_site_transient( 'update_core', $updates);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">
</span><span class="cx">         $plugins = get_plugins();
</span><span class="cx">         $active = get_option( 'active_plugins' );
</span><del>-        $current = get_transient( 'update_plugins' );
</del><ins>+        $current = get_site_transient( 'update_plugins' );
</ins><span class="cx">         if ( ! is_object($current) )
</span><span class="cx">                 $current = new stdClass;
</span><span class="cx">
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">
</span><span class="cx">         // Update last_checked for current to prevent multiple blocking requests if request hangs
</span><span class="cx">         $current->last_checked = time();
</span><del>-        set_transient( 'update_plugins', $current );
</del><ins>+        set_site_transient( 'update_plugins', $current );
</ins><span class="cx">
</span><span class="cx">         $to_send = (object)compact('plugins', 'active');
</span><span class="cx">
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx">         else
</span><span class="cx">                 $new_option->response = array();
</span><span class="cx">
</span><del>-        set_transient( 'update_plugins', $new_option );
</del><ins>+        set_site_transient( 'update_plugins', $new_option );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">                 require_once( ABSPATH . 'wp-includes/theme.php' );
</span><span class="cx">
</span><span class="cx">         $installed_themes = get_themes( );
</span><del>-        $current_theme = get_transient( 'update_themes' );
</del><ins>+        $current_theme = get_site_transient( 'update_themes' );
</ins><span class="cx">         if ( ! is_object($current_theme) )
</span><span class="cx">                 $current_theme = new stdClass;
</span><span class="cx">
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">
</span><span class="cx">         // Update last_checked for current to prevent multiple blocking requests if request hangs
</span><span class="cx">         $current_theme->last_checked = time();
</span><del>-        set_transient( 'update_themes', $current_theme );
</del><ins>+        set_site_transient( 'update_themes', $current_theme );
</ins><span class="cx">
</span><span class="cx">         $current_theme->template = get_option( 'template' );
</span><span class="cx">
</span><span class="lines">@@ -263,13 +263,13 @@
</span><span class="cx">                 $new_option->response = $response;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        set_transient( 'update_themes', $new_option );
</del><ins>+        set_site_transient( 'update_themes', $new_option );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function _maybe_update_core() {
</span><span class="cx">         global $wp_version;
</span><span class="cx">
</span><del>-        $current = get_transient( 'update_core' );
</del><ins>+        $current = get_site_transient( 'update_core' );
</ins><span class="cx">
</span><span class="cx">         if ( isset( $current->last_checked ) &&
</span><span class="cx">                 43200 > ( time() - $current->last_checked ) &&
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><span class="cx"> function _maybe_update_plugins() {
</span><del>-        $current = get_transient( 'update_plugins' );
</del><ins>+        $current = get_site_transient( 'update_plugins' );
</ins><span class="cx">         if ( isset( $current->last_checked ) && 43200 > ( time() - $current->last_checked ) )
</span><span class="cx">                 return;
</span><span class="cx">         wp_update_plugins();
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><span class="cx"> function _maybe_update_themes( ) {
</span><del>-        $current = get_transient( 'update_themes' );
</del><ins>+        $current = get_site_transient( 'update_themes' );
</ins><span class="cx">         if( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) )
</span><span class="cx">                 return;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>