WordPress.org

Make WordPress Core

Changeset 15747


Ignore:
Timestamp:
10/07/2010 08:12:49 PM (9 years ago)
Author:
ryan
Message:

Unset global variables when they are no longer needed.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r15746 r15747  
    2323 */
    2424
    25 $awaiting_mod = wp_count_comments();
    26 $awaiting_mod = $awaiting_mod->moderated;
    27 
    2825$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div' );
    2926
     
    5855
    5956        $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');
    60         unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title);
     57        unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress);
    6158    }
    6259}
     
    10299    unset($tax);
    103100
     101$awaiting_mod = wp_count_comments();
     102$awaiting_mod = $awaiting_mod->moderated;
    104103$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' );
     104unset($awaiting_mod);
    105105
    106106$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
     
    135135    }
    136136}
    137 unset($ptype, $ptype_obj);
     137unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i);
    138138
    139139$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
  • trunk/wp-includes/default-filters.php

    r15559 r15747  
    262262add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
    263263
     264unset($filter, $action);
     265
    264266?>
  • trunk/wp-includes/ms-settings.php

    r14452 r15747  
    7979                wp_cache_set( 'current_blog_' . $domain . $path, $current_blog, 'site-options' );
    8080        }
     81        unset($reserved_blognames);
    8182    }
    8283
  • trunk/wp-includes/vars.php

    r15746 r15747  
    3939        $pagenow = 'index.php';
    4040}
     41unset($self_matches);
    4142
    4243// Simple browser detection
Note: See TracChangeset for help on using the changeset viewer.