<!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>[15867] trunk/wp-admin: Add plugin update notifications, plugin install,
plugin update to the network admin screen.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15867">15867</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-10-20 14:16:03 +0000 (Wed, 20 Oct 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add plugin update notifications, plugin install, plugin update to the network admin screen. Props PeteMall. see <a href="http://trac.wordpress.org/ticket/15129">#15129</a></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="#trunkwpadminincludesupdatephp">trunk/wp-admin/includes/update.php</a></li>
<li><a href="#trunkwpadminnetworkmenuphp">trunk/wp-admin/network/menu.php</a></li>
<li><a href="#trunkwpadminplugininstallphp">trunk/wp-admin/plugin-install.php</a></li>
<li><a href="#trunkwpadminupdatephp">trunk/wp-admin/update.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadminnetworkplugininstallphp">trunk/wp-admin/network/plugin-install.php</a></li>
<li><a href="#trunkwpadminnetworkupdatephp">trunk/wp-admin/network/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 (15866 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-upgrader.php        2010-10-20 14:08:29 UTC (rev 15866)
+++ trunk/wp-admin/includes/class-wp-upgrader.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -1281,15 +1281,17 @@
</span><span class="cx">                 else
</span><span class="cx">                         $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>';
</span><span class="cx">
</span><del>-                if ( is_multisite() && current_user_can( 'manage_network_plugins' ) )
</del><ins>+                if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
</ins><span class="cx">                         $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>';
</span><ins>+                        unset( $install_actions['activate_plugin'] );
+                }
</ins><span class="cx">
</span><span class="cx">                 if ( 'import' == $from )
</span><span class="cx">                         $install_actions['importers_page'] = '<a href="' . admin_url('import.php') . '" title="' . esc_attr__('Return to Importers') . '" target="_parent">' . __('Return to Importers') . '</a>';
</span><span class="cx">                 else if ( $this->type == 'web' )
</span><del>-                        $install_actions['plugins_page'] = '<a href="' . admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>';
</del><ins>+                        $install_actions['plugins_page'] = '<a href="' . self_admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>';
</ins><span class="cx">                 else
</span><del>-                        $install_actions['plugins_page'] = '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>';
</del><ins>+                        $install_actions['plugins_page'] = '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>';
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">                 if ( ! $this->result || is_wp_error($this->result) ) {
</span></span></pre></div>
<a id="trunkwpadminincludesplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/plugin-install.php (15866 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/plugin-install.php        2010-10-20 14:08:29 UTC (rev 15866)
+++ trunk/wp-admin/includes/plugin-install.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">                 $tags = array();
</span><span class="cx">                 foreach ( (array)$api_tags as $tag )
</span><span class="cx">                         $tags[ $tag['name'] ] = (object) array(
</span><del>-                                                                        'link' => esc_url( admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
</del><ins>+                                                                        'link' => esc_url( self_admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
</ins><span class="cx">                                                                         'name' => $tag['name'],
</span><span class="cx">                                                                         'id' => sanitize_title_with_dashes($tag['name']),
</span><span class="cx">                                                                         'count' => $tag['count'] );
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> ?>
</span><span class="cx">         <h4><?php _e('Install a plugin in .zip format') ?></h4>
</span><span class="cx">         <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.') ?></p>
</span><del>-        <form method="post" enctype="multipart/form-data" action="<?php echo admin_url('update.php?action=upload-plugin') ?>">
</del><ins>+        <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-plugin') ?>">
</ins><span class="cx">                 <?php wp_nonce_field( 'plugin-upload') ?>
</span><span class="cx">                 <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label>
</span><span class="cx">                 <input type="file" id="pluginzip" name="pluginzip" />
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx">                                 $update_file = $file;
</span><span class="cx">                                 $version = $plugin->new_version;
</span><span class="cx">                                 if ( current_user_can('update_plugins') )
</span><del>-                                        $url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file);
</del><ins>+                                        $url = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $update_file), 'upgrade-plugin_' . $update_file);
</ins><span class="cx">                                 break;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">                         $installed_plugin = get_plugins('/' . $api->slug);
</span><span class="cx">                         if ( empty($installed_plugin) ) {
</span><span class="cx">                                 if ( current_user_can('install_plugins') )
</span><del>-                                        $url = wp_nonce_url(admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
</del><ins>+                                        $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
</ins><span class="cx">                         } else {
</span><span class="cx">                                 $key = array_shift( $key = array_keys($installed_plugin) ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers
</span><span class="cx">                                 if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         // "install" & no directory with that slug
</span><span class="cx">                         if ( current_user_can('install_plugins') )
</span><del>-                                $url = wp_nonce_url(admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
</del><ins>+                                $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         if ( isset($_GET['from']) )
</span></span></pre></div>
<a id="trunkwpadminincludesupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/update.php (15866 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/update.php        2010-10-20 14:08:29 UTC (rev 15866)
+++ trunk/wp-admin/includes/update.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx">         $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
</span><span class="cx">         $plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags );
</span><span class="cx">
</span><del>-        $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
</del><ins>+        $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
</ins><span class="cx">
</span><span class="cx">         echo '<tr class="plugin-update-tr"><td colspan="3" class="plugin-update"><div class="update-message">';
</span><span class="cx">         if ( ! current_user_can('update_plugins') )
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">         else if ( empty($r->package) )
</span><span class="cx">                 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic upgrade is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
</span><span class="cx">         else
</span><del>-                printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) );
</del><ins>+                printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">upgrade automatically</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );
</ins><span class="cx">
</span><span class="cx">         do_action( "in_plugin_update_message-$file", $plugin_data, $r );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminnetworkmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/menu.php (15866 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/menu.php        2010-10-20 14:08:29 UTC (rev 15866)
+++ trunk/wp-admin/network/menu.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -9,19 +9,23 @@
</span><span class="cx"> $menu[5] = array(__('Sites'), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'div');
</span><span class="cx"> $menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div');
</span><span class="cx"> $menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div');
</span><del>-$menu[20] = array(__('Plugins'), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
</del><ins>+
+$plugin_update_count = 0;
+$update_plugins = get_site_transient( 'update_plugins' );
+if ( !empty($update_plugins->response) )
+        $plugin_update_count = count( $update_plugins->response );
+$menu[20] = array(sprintf( __('Plugins %s'), "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
+$submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' );
+$submenu['plugins.php'][10] = array( _x('Add New', 'plugin editor'), 'install_plugins', 'plugin-install.php' );
+$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
+
+
</ins><span class="cx"> $menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div');
</span><span class="cx"> $menu[30] = array(__('Update'), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div');
</span><span class="cx">
</span><span class="cx"> $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' );
</span><span class="cx">
</span><del>-$compat = array();
-$submenu = array();
-
-$submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' );
-$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
-
-$submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' );
</del><ins>+$submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' );
</ins><span class="cx"> $submenu['themes.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_themes', 'theme-editor.php' );
</span><span class="cx">
</span><span class="cx"> require_once(ABSPATH . 'wp-admin/includes/menu.php');
</span></span></pre></div>
<a id="trunkwpadminnetworkplugininstallphp"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/network/plugin-install.php (0 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/plugin-install.php         (rev 0)
+++ trunk/wp-admin/network/plugin-install.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+<?php
+
+require_once( './admin.php' );
+
+require( '../plugin-install.php' );
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/wp-admin/network/plugin-install.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx"> + native
</span></span></pre></div>
<a id="trunkwpadminnetworkupdatephp"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/network/update.php (0 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/update.php         (rev 0)
+++ trunk/wp-admin/network/update.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+<?php
+
+require_once( './admin.php' );
+
+require( '../update.php' );
</ins><span class="cx">Property changes on: trunk/wp-admin/network/update.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx"> + native
</span></span></pre></div>
<a id="trunkwpadminplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugin-install.php (15866 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugin-install.php        2010-10-20 14:08:29 UTC (rev 15866)
+++ trunk/wp-admin/plugin-install.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">         '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
</span><span class="cx"> );
</span><span class="cx">
</span><del>-include('./admin-header.php');
</del><ins>+include(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx"> ?>
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><span class="lines">@@ -47,5 +47,5 @@
</span><span class="cx"> <?php do_action('install_plugins_' . $tab, $paged); ?>
</span><span class="cx"> </div>
</span><span class="cx"> <?php
</span><del>-include('./admin-footer.php');
</del><ins>+include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/update.php (15866 => 15867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/update.php        2010-10-20 14:08:29 UTC (rev 15866)
+++ trunk/wp-admin/update.php        2010-10-20 14:16:03 UTC (rev 15867)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">                 $title = __('Upgrade Plugin');
</span><span class="cx">                 $parent_file = 'plugins.php';
</span><span class="cx">                 $submenu_file = 'plugins.php';
</span><del>-                require_once('./admin-header.php');
</del><ins>+                require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx">
</span><span class="cx">                 $nonce = 'upgrade-plugin_' . $plugin;
</span><span class="cx">                 $url = 'update.php?action=upgrade-plugin&plugin=' . $plugin;
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">                 $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) );
</span><span class="cx">                 $upgrader->upgrade($plugin);
</span><span class="cx">
</span><del>-                include('./admin-footer.php');
</del><ins>+                include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">
</span><span class="cx">         } elseif ('activate-plugin' == $action ) {
</span><span class="cx">                 if ( ! current_user_can('update_plugins') )
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">                 $title = __('Plugin Install');
</span><span class="cx">                 $parent_file = 'plugins.php';
</span><span class="cx">                 $submenu_file = 'plugin-install.php';
</span><del>-                require_once('./admin-header.php');
</del><ins>+                require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx">
</span><span class="cx">                 $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version );
</span><span class="cx">                 $nonce = 'install-plugin_' . $plugin;
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">                 $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
</span><span class="cx">                 $upgrader->install($api->download_link);
</span><span class="cx">
</span><del>-                include('./admin-footer.php');
</del><ins>+                include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">
</span><span class="cx">         } elseif ( 'upload-plugin' == $action ) {
</span><span class="cx">
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">                 $title = __('Upload Plugin');
</span><span class="cx">                 $parent_file = 'plugins.php';
</span><span class="cx">                 $submenu_file = 'plugin-install.php';
</span><del>-                require_once('./admin-header.php');
</del><ins>+                require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx">
</span><span class="cx">                 $title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) );
</span><span class="cx">                 $nonce = 'plugin-upload';
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">                 $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
</span><span class="cx">                 $upgrader->install( $file_upload->package );
</span><span class="cx">
</span><del>-                include('./admin-footer.php');
</del><ins>+                include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">
</span><span class="cx">         } elseif ( 'upgrade-theme' == $action ) {
</span><span class="cx">
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">                 $title = __('Upgrade Theme');
</span><span class="cx">                 $parent_file = 'themes.php';
</span><span class="cx">                 $submenu_file = 'themes.php';
</span><del>-                require_once('./admin-header.php');
</del><ins>+                require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx">
</span><span class="cx">                 $nonce = 'upgrade-theme_' . $theme;
</span><span class="cx">                 $url = 'update.php?action=upgrade-theme&theme=' . $theme;
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx">                 $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact('title', 'nonce', 'url', 'theme') ) );
</span><span class="cx">                 $upgrader->upgrade($theme);
</span><span class="cx">
</span><del>-                include('./admin-footer.php');
</del><ins>+                include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">         } elseif ( 'update-selected-themes' == $action ) {
</span><span class="cx">                 if ( ! current_user_can( 'update_themes' ) )
</span><span class="cx">                         wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx">                 $title = __('Install Themes');
</span><span class="cx">                 $parent_file = 'themes.php';
</span><span class="cx">                 $submenu_file = 'themes.php';
</span><del>-                require_once('./admin-header.php');
</del><ins>+                require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx">
</span><span class="cx">                 $title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version );
</span><span class="cx">                 $nonce = 'install-theme_' . $theme;
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx">                 $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
</span><span class="cx">                 $upgrader->install($api->download_link);
</span><span class="cx">
</span><del>-                include('./admin-footer.php');
</del><ins>+                include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">
</span><span class="cx">         } elseif ( 'upload-theme' == $action ) {
</span><span class="cx">
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">                 $submenu_file = 'theme-install.php';
</span><span class="cx">                 add_thickbox();
</span><span class="cx">                 wp_enqueue_script('theme-preview');
</span><del>-                require_once('./admin-header.php');
</del><ins>+                require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx">
</span><span class="cx">                 $title = sprintf( __('Installing Theme from uploaded file: %s'), basename( $file_upload->filename ) );
</span><span class="cx">                 $nonce = 'theme-upload';
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">                 $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
</span><span class="cx">                 $upgrader->install( $file_upload->package );
</span><span class="cx">
</span><del>-                include('./admin-footer.php');
</del><ins>+                include(ABSPATH . 'wp-admin/admin-footer.php');
</ins><span class="cx">
</span><span class="cx">         } else {
</span><span class="cx">                 do_action('update-custom_' . $action);
</span></span></pre>
</div>
</div>
</body>
</html>