Skip to content

Commit 708c01d

Browse files
committed
unset temp vars so they don't pollute the global namespace. Formatting cleanups
git-svn-id: https://develop.svn.wordpress.org/trunk@12846 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 08da519 commit 708c01d

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

wp-admin/admin-header.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@
5353
do_action("admin_head-$hook_suffix");
5454
do_action('admin_head');
5555

56-
if ( get_user_setting('mfold') == 'f' ) {
56+
if ( get_user_setting('mfold') == 'f' )
5757
$admin_body_class .= ' folded';
58-
}
5958

6059
if ( $is_iphone ) { ?>
6160
<style type="text/css">.row-actions{visibility:visible;}</style>
@@ -84,6 +83,7 @@
8483
if ( $blog_name != $blog_name_excerpt )
8584
$blog_name_excerpt = trim($blog_name_excerpt) . '&hellip;';
8685
$blog_name = $blog_name_excerpt;
86+
unset($blog_name_excerpt);
8787
}
8888
$title_class = '';
8989
if ( function_exists('mb_strlen') ) {
@@ -110,6 +110,8 @@
110110

111111
<div id="wpbody">
112112
<?php
113+
unset($title_class, $blog_name);
114+
113115
require(ABSPATH . 'wp-admin/menu-header.php');
114116

115117
$current_screen->parent_file = $parent_file;
@@ -123,6 +125,5 @@
123125

124126
do_action('admin_notices');
125127

126-
if ( $parent_file == 'options-general.php' ) {
128+
if ( $parent_file == 'options-general.php' )
127129
require(ABSPATH . 'wp-admin/options-head.php');
128-
}

wp-admin/admin.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
require_once( ABSPATH . WPINC . '/http.php' );
4343
$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
4444
do_action( 'after_mu_upgrade', $response );
45+
unset($response);
4546
}
47+
unset($c);
4648
}
4749
}
4850

@@ -123,16 +125,16 @@
123125

124126
do_action($page_hook);
125127
} else {
126-
if ( validate_file($plugin_page) ) {
128+
if ( validate_file($plugin_page) )
127129
wp_die(__('Invalid plugin page'));
128-
}
130+
129131

130132
if ( !( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && !( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") && is_file(WPMU_PLUGIN_DIR . "/$plugin_page") ) )
131133
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
132134

133135
do_action('load-' . $plugin_page);
134136

135-
if (! isset($_GET['noheader']))
137+
if ( !isset($_GET['noheader']))
136138
require_once(ABSPATH . 'wp-admin/admin-header.php');
137139

138140
if ( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") )
@@ -156,12 +158,9 @@
156158
}
157159

158160
// Allow plugins to define importers as well
159-
if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]))
160-
{
161+
if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2])) {
161162
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
162-
{
163163
wp_die(__('Cannot load importer.'));
164-
}
165164
include(ABSPATH . "wp-admin/import/$importer.php");
166165
}
167166

0 commit comments

Comments
 (0)