Unset global variables when they are no longer needed.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9c31fd7c70
commit
7119110439
|
@ -22,9 +22,6 @@
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$awaiting_mod = wp_count_comments();
|
|
||||||
$awaiting_mod = $awaiting_mod->moderated;
|
|
||||||
|
|
||||||
$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div' );
|
$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div' );
|
||||||
|
|
||||||
if ( is_multisite() || is_super_admin() ) {
|
if ( is_multisite() || is_super_admin() ) {
|
||||||
|
@ -57,7 +54,7 @@ if ( is_multisite() || is_super_admin() ) {
|
||||||
$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
|
$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
|
||||||
|
|
||||||
$submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'install_plugins', 'update-core.php');
|
$submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'install_plugins', 'update-core.php');
|
||||||
unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title);
|
unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +98,10 @@ $menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'me
|
||||||
}
|
}
|
||||||
unset($tax);
|
unset($tax);
|
||||||
|
|
||||||
|
$awaiting_mod = wp_count_comments();
|
||||||
|
$awaiting_mod = $awaiting_mod->moderated;
|
||||||
$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'div' );
|
$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'div' );
|
||||||
|
unset($awaiting_mod);
|
||||||
|
|
||||||
$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
|
$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false)
|
||||||
$submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
|
$submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($ptype, $ptype_obj);
|
unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i);
|
||||||
|
|
||||||
$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
|
$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
|
||||||
|
|
||||||
|
|
|
@ -261,4 +261,6 @@ add_filter( 'pre_option_gmt_offset','wp_timezone_override_offset' );
|
||||||
add_action( 'admin_init', 'register_admin_color_schemes', 1);
|
add_action( 'admin_init', 'register_admin_color_schemes', 1);
|
||||||
add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
|
add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
|
||||||
|
|
||||||
|
unset($filter, $action);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -78,6 +78,7 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
|
||||||
if ( $current_blog )
|
if ( $current_blog )
|
||||||
wp_cache_set( 'current_blog_' . $domain . $path, $current_blog, 'site-options' );
|
wp_cache_set( 'current_blog_' . $domain . $path, $current_blog, 'site-options' );
|
||||||
}
|
}
|
||||||
|
unset($reserved_blognames);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && ! is_object( $current_blog ) ) {
|
if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && ! is_object( $current_blog ) ) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ if ( is_admin() ) {
|
||||||
else
|
else
|
||||||
$pagenow = 'index.php';
|
$pagenow = 'index.php';
|
||||||
}
|
}
|
||||||
|
unset($self_matches);
|
||||||
|
|
||||||
// Simple browser detection
|
// Simple browser detection
|
||||||
$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false;
|
$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false;
|
||||||
|
|
Loading…
Reference in New Issue