<!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>[15747] trunk: Unset global variables when they are no longer needed.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15747">15747</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-10-07 20:12:49 +0000 (Thu, 07 Oct 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unset global variables when they are no longer needed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpincludesdefaultfiltersphp">trunk/wp-includes/default-filters.php</a></li>
<li><a href="#trunkwpincludesmssettingsphp">trunk/wp-includes/ms-settings.php</a></li>
<li><a href="#trunkwpincludesvarsphp">trunk/wp-includes/vars.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (15746 => 15747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-10-07 19:34:18 UTC (rev 15746)
+++ trunk/wp-admin/menu.php        2010-10-07 20:12:49 UTC (rev 15747)
</span><span class="lines">@@ -22,9 +22,6 @@
</span><span class="cx">  * @var array
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-$awaiting_mod = wp_count_comments();
-$awaiting_mod = $awaiting_mod-&gt;moderated;
-
</del><span class="cx"> $menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div' );
</span><span class="cx"> 
</span><span class="cx"> if ( is_multisite() || is_super_admin() ) {
</span><span class="lines">@@ -57,7 +54,7 @@
</span><span class="cx">                 $update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
</span><span class="cx"> 
</span><span class="cx">                 $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), &quot;&lt;span class='update-plugins count-$update_count' title='$update_title'&gt;&lt;span class='update-count'&gt;&quot; . number_format_i18n($update_count) . &quot;&lt;/span&gt;&lt;/span&gt;&quot; ), 'install_plugins',  'update-core.php');
</span><del>-                unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title);
</del><ins>+                unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -101,7 +98,10 @@
</span><span class="cx">         }
</span><span class="cx">         unset($tax);
</span><span class="cx"> 
</span><ins>+$awaiting_mod = wp_count_comments();
+$awaiting_mod = $awaiting_mod-&gt;moderated;
</ins><span class="cx"> $menu[25] = array( sprintf( __('Comments %s'), &quot;&lt;span id='awaiting-mod' class='count-$awaiting_mod'&gt;&lt;span class='pending-count'&gt;&quot; . number_format_i18n($awaiting_mod) . &quot;&lt;/span&gt;&lt;/span&gt;&quot; ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'div' );
</span><ins>+unset($awaiting_mod);
</ins><span class="cx"> 
</span><span class="cx"> $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
</span><span class="cx"> 
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">                 $submenu[&quot;edit.php?post_type=$ptype&quot;][$i++] = array( esc_attr( $tax-&gt;labels-&gt;name ), $tax-&gt;cap-&gt;manage_terms, &quot;edit-tags.php?taxonomy=$tax-&gt;name&amp;amp;post_type=$ptype&quot; );
</span><span class="cx">         }
</span><span class="cx"> }
</span><del>-unset($ptype, $ptype_obj);
</del><ins>+unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i);
</ins><span class="cx"> 
</span><span class="cx"> $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-filters.php (15746 => 15747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-filters.php        2010-10-07 19:34:18 UTC (rev 15746)
+++ trunk/wp-includes/default-filters.php        2010-10-07 20:12:49 UTC (rev 15747)
</span><span class="lines">@@ -261,4 +261,6 @@
</span><span class="cx"> add_action( 'admin_init', 'register_admin_color_schemes', 1);
</span><span class="cx"> add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
</span><span class="cx"> 
</span><ins>+unset($filter, $action);
+
</ins><span class="cx"> ?&gt;
</span></span></pre></div>
<a id="trunkwpincludesmssettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-settings.php (15746 => 15747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-settings.php        2010-10-07 19:34:18 UTC (rev 15746)
+++ trunk/wp-includes/ms-settings.php        2010-10-07 20:12:49 UTC (rev 15747)
</span><span class="lines">@@ -78,6 +78,7 @@
</span><span class="cx">                         if ( $current_blog )
</span><span class="cx">                                 wp_cache_set( 'current_blog_' . $domain . $path, $current_blog, 'site-options' );
</span><span class="cx">                 }
</span><ins>+                unset($reserved_blognames);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( ! defined( 'WP_INSTALLING' ) &amp;&amp; is_subdomain_install() &amp;&amp; ! is_object( $current_blog ) ) {
</span></span></pre></div>
<a id="trunkwpincludesvarsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/vars.php (15746 => 15747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/vars.php        2010-10-07 19:34:18 UTC (rev 15746)
+++ trunk/wp-includes/vars.php        2010-10-07 20:12:49 UTC (rev 15747)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx">         else
</span><span class="cx">                 $pagenow = 'index.php';
</span><span class="cx"> }
</span><ins>+unset($self_matches);
</ins><span class="cx"> 
</span><span class="cx"> // Simple browser detection
</span><span class="cx"> $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false;
</span></span></pre>
</div>
</div>

</body>
</html>