<!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>[16242] trunk/wp-admin: site-themes.php cleanup.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16242">16242</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-11-08 21:52:54 +0000 (Mon, 08 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>site-themes.php cleanup. Props PeteMall. see <a href="http://trac.wordpress.org/ticket/14897">#14897</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesclasswpmsthemeslisttablephp">trunk/wp-admin/includes/class-wp-ms-themes-list-table.php</a></li>
<li><a href="#trunkwpadminnetworksitethemesphp">trunk/wp-admin/network/site-themes.php</a></li>
<li><a href="#trunkwpadminnetworkthemesphp">trunk/wp-admin/network/themes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesclasswpmsthemeslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-ms-themes-list-table.php (16241 => 16242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-ms-themes-list-table.php        2010-11-08 19:40:05 UTC (rev 16241)
+++ trunk/wp-admin/includes/class-wp-ms-themes-list-table.php        2010-11-08 21:52:54 UTC (rev 16242)
</span><span class="lines">@@ -7,6 +7,9 @@
</span><span class="cx">  * @since 3.1.0
</span><span class="cx">  */
</span><span class="cx"> class WP_MS_Themes_List_Table extends WP_List_Table {
</span><ins>+        
+        var $site_id;
+        var $is_site_themes;
</ins><span class="cx"> 
</span><span class="cx">         function WP_MS_Themes_List_Table() {
</span><span class="cx">                 global $status, $page;
</span><span class="lines">@@ -37,8 +40,10 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                if ( !current_user_can('manage_network_themes') )
-                        wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
</del><ins>+                if ( $this-&gt;is_site_themes &amp;&amp; !current_user_can('manage_sites') ) 
+                        wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 
+                else if ( !$this-&gt;is_site_themes &amp;&amp; !current_user_can('manage_network_themes') ) 
+                        wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function prepare_items() {
</span><span class="lines">@@ -54,11 +59,17 @@
</span><span class="cx">                         'upgrade' =&gt; array()
</span><span class="cx">                 );
</span><span class="cx"> 
</span><del>-                $allowed_themes = get_site_allowed_themes();
</del><ins>+                $site_allowed_themes = get_site_allowed_themes(); 
+                if ( !$this-&gt;is_site_themes ) 
+                        $allowed_themes = $site_allowed_themes; 
+                else 
+                        $allowed_themes = wpmu_get_blog_allowedthemes( $this-&gt;site_id );
+                
</ins><span class="cx">                 $current = get_site_transient( 'update_themes' );
</span><span class="cx"> 
</span><span class="cx">                 foreach ( (array) $themes['all'] as $key =&gt; $theme ) {
</span><span class="cx">                         $theme_key = esc_html( $theme['Stylesheet'] );
</span><ins>+
</ins><span class="cx">                         if ( isset( $allowed_themes [ $theme_key ] ) )  {
</span><span class="cx">                                 $themes['all'][$key]['enabled'] = true;
</span><span class="cx">                                 $themes['enabled'][$key] = $themes['all'][$key];
</span><span class="lines">@@ -69,6 +80,12 @@
</span><span class="cx">                         }
</span><span class="cx">                         if ( isset( $current-&gt;response[ $theme['Template'] ] ) )
</span><span class="cx">                                 $themes['upgrade'][$key] = $themes['all'][$key];
</span><ins>+
+                        if ( $this-&gt;is_site_themes &amp;&amp; isset( $site_allowed_themes[$theme_key] ) ) { 
+                                unset( $themes['all'][$key] ); 
+                                unset( $themes['enabled'][$key] ); 
+                                unset( $themes['disabled'][$key] ); 
+                        }
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if ( !current_user_can( 'update_themes' ) )
</span><span class="lines">@@ -188,8 +205,13 @@
</span><span class="cx">                                         break;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><ins>+                        if ( $this-&gt;is_site_themes ) 
+                                $url = 'site-themes.php?id=' . $this-&gt;site_id; 
+                        else 
+                                $url = 'themes.php';
+
</ins><span class="cx">                         $status_links[$type] = sprintf( &quot;&lt;a href='%s' %s&gt;%s&lt;/a&gt;&quot;,
</span><del>-                                add_query_arg('theme_status', $type, 'themes.php'),
</del><ins>+                                add_query_arg('theme_status', $type, $url),
</ins><span class="cx">                                 ( $type == $status ) ? ' class=&quot;current&quot;' : '',
</span><span class="cx">                                 sprintf( $text, number_format_i18n( $count ) )
</span><span class="cx">                         );
</span><span class="lines">@@ -203,9 +225,9 @@
</span><span class="cx"> 
</span><span class="cx">                 $actions = array();
</span><span class="cx">                 if ( 'enabled' != $status )
</span><del>-                        $actions['network-enable-selected'] = __( 'Enable' );
</del><ins>+                        $actions['enable-selected'] = __( 'Enable' );
</ins><span class="cx">                 if ( 'disabled' != $status )
</span><del>-                        $actions['network-disable-selected'] = __( 'Disable' );
</del><ins>+                        $actions['disable-selected'] = __( 'Disable' );
</ins><span class="cx">                 if ( current_user_can( 'update_themes' ) )
</span><span class="cx">                         $actions['update-selected'] = __( 'Update' );
</span><span class="cx">                         
</span><span class="lines">@@ -225,24 +247,26 @@
</span><span class="cx">                 global $status, $page, $s;
</span><span class="cx"> 
</span><span class="cx">                 $context = $status;
</span><ins>+                
+                if ( $this-&gt;is_site_themes )
+                        $url = &quot;site-themes.php?id={$this-&gt;site_id}&amp;amp;&quot;;
+                else
+                        $url = 'themes.php?';
</ins><span class="cx"> 
</span><span class="cx">                 foreach ( $this-&gt;items as $key =&gt; $theme ) {
</span><span class="cx">                         // preorder
</span><span class="cx">                         $actions = array(
</span><del>-                                'network_enable' =&gt; '',
-                                'network_disable' =&gt; '',
</del><ins>+                                'enable' =&gt; '',
+                                'disable' =&gt; '',
</ins><span class="cx">                                 'edit' =&gt; ''
</span><span class="cx">                         );
</span><span class="cx">                         
</span><span class="cx">                         $theme_key = esc_html( $theme['Stylesheet'] );
</span><span class="cx"> 
</span><del>-                        if ( empty( $theme['enabled'] ) ) {
-                                if ( current_user_can( 'manage_network_themes' ) )
-                                        $actions['network_enable'] = '&lt;a href=&quot;' . wp_nonce_url('themes.php?action=network-enable&amp;amp;theme=' . $theme_key . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'enable-theme_' . $theme_key) . '&quot; title=&quot;' . __('Enable this theme for all sites in this network') . '&quot; class=&quot;edit&quot;&gt;' . __('Enable') . '&lt;/a&gt;';
-                        } else {
-                                if ( current_user_can( 'manage_network_themes' ) )
-                                        $actions['network_disable'] = '&lt;a href=&quot;' . wp_nonce_url('themes.php?action=network-disable&amp;amp;theme=' . $theme_key . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'disable-theme_' . $theme_key) . '&quot; title=&quot;' . __('Disable this theme') . '&quot;&gt;' . __('Disable') . '&lt;/a&gt;';
-                        }
</del><ins>+                        if ( empty( $theme['enabled'] ) )
+                                        $actions['enable'] = '&lt;a href=&quot;' . wp_nonce_url($url . 'action=enable&amp;amp;theme=' . $theme_key . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'enable-theme_' . $theme_key) . '&quot; title=&quot;' . __('Enable this theme') . '&quot; class=&quot;edit&quot;&gt;' . __('Enable') . '&lt;/a&gt;';
+                        else
+                                        $actions['disable'] = '&lt;a href=&quot;' . wp_nonce_url($url . 'action=disable&amp;amp;theme=' . $theme_key . '&amp;amp;paged=' . $page . '&amp;amp;s=' . $s, 'disable-theme_' . $theme_key) . '&quot; title=&quot;' . __('Disable this theme') . '&quot;&gt;' . __('Disable') . '&lt;/a&gt;';
</ins><span class="cx">                         
</span><span class="cx">                         if ( current_user_can('edit_themes') )
</span><span class="cx">                                 $actions['edit'] = '&lt;a href=&quot;theme-editor.php?theme=' . $theme['Name'] . '&quot; title=&quot;' . __('Open this theme in the Theme Editor') . '&quot; class=&quot;edit&quot;&gt;' . __('Edit') . '&lt;/a&gt;';
</span></span></pre></div>
<a id="trunkwpadminnetworksitethemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/site-themes.php (16241 => 16242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/site-themes.php        2010-11-08 19:40:05 UTC (rev 16241)
+++ trunk/wp-admin/network/site-themes.php        2010-11-08 21:52:54 UTC (rev 16242)
</span><span class="lines">@@ -1,26 +1,32 @@
</span><span class="cx"> &lt;?php
</span><del>-
</del><span class="cx"> /**
</span><del>- * Edit Site Themes Administration Screen
</del><ins>+ * Multisite themes administration panel.
</ins><span class="cx">  *
</span><span class="cx">  * @package WordPress
</span><del>- * @subpackage Administration
</del><ins>+ * @subpackage Multisite
</ins><span class="cx">  * @since 3.1.0
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-/** Load WordPress Administration Bootstrap */
-require_once('./admin.php');
</del><ins>+require_once( './admin.php' );
</ins><span class="cx"> 
</span><del>-if ( ! is_multisite() )
-        wp_die( __( 'Multisite support is not enabled.' ) );
</del><ins>+$wp_list_table = get_list_table('WP_MS_Themes_List_Table');
+$wp_list_table-&gt;check_permissions();
</ins><span class="cx"> 
</span><del>-if ( ! current_user_can('manage_sites') )
-        wp_die(__('You do not have sufficient permissions to edit this site.'));
</del><ins>+$action = $wp_list_table-&gt;current_action();
</ins><span class="cx"> 
</span><ins>+$s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
+
+// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
+$_SERVER['REQUEST_URI'] = remove_query_arg(array('network-enable', 'network-disable', 'network-enable-selected', 'network-disable-selected'), $_SERVER['REQUEST_URI']);
+
</ins><span class="cx"> $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0;
</span><span class="cx"> 
</span><span class="cx"> if ( ! $id )
</span><span class="cx">         wp_die( __('Invalid site ID.') );
</span><ins>+        
+$wp_list_table-&gt;site_id = $id;
+$wp_list_table-&gt;is_site_themes = true;
+$wp_list_table-&gt;prepare_items();
</ins><span class="cx"> 
</span><span class="cx"> $details = get_blog_details( $id );
</span><span class="cx"> if ( $details-&gt;site_id != $wpdb-&gt;siteid )
</span><span class="lines">@@ -28,36 +34,65 @@
</span><span class="cx"> 
</span><span class="cx"> $is_main_site = is_main_site( $id );
</span><span class="cx"> 
</span><del>-if ( isset($_REQUEST['action']) &amp;&amp; 'update-site' == $_REQUEST['action'] ) {
-        check_admin_referer( 'edit-site' );
-
</del><ins>+if ( $action ) {
</ins><span class="cx">         switch_to_blog( $id );
</span><ins>+        $allowed_themes = get_option( 'allowedthemes' );
</ins><span class="cx"> 
</span><del>-        $allowedthemes = array();
-        if ( isset($_POST['theme']) &amp;&amp; is_array( $_POST['theme'] ) ) {
-                foreach ( $_POST['theme'] as $theme =&gt; $val ) {
-                        if ( 'on' == $val )
-                                $allowedthemes[$theme] = true;
-                }
</del><ins>+        switch ( $action ) {
+                case 'enable':
+                        $theme = $_GET['theme'];
+                        if ( !$allowed_themes )
+                                $allowed_themes = array( $theme =&gt; true );
+                        else
+                                $allowed_themes[$theme] = true;
+                        break;
+                case 'disable':
+                        $theme = $_GET['theme'];
+                        if ( !$allowed_themes )
+                                $allowed_themes = array();
+                        else
+                                unset( $allowed_themes[$theme] );
+                        break;
+                case 'enable-selected':
+                        $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
+                        if ( empty($themes) ) {
+                                restore_current_blog();
+                                wp_redirect( wp_get_referer() );
+                                exit;
+                        }                                                
+                        foreach( (array) $themes as $theme )
+                                $allowed_themes[ $theme ] = true;
+                        break;
+                case 'disable-selected':
+                        $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
+                        if ( empty($themes) ) {
+                                restore_current_blog();
+                                wp_redirect( wp_get_referer() );
+                                exit;
+                        }                                                
+                        foreach( (array) $themes as $theme )
+                                unset( $allowed_themes[ $theme ] );
+                        break;
</ins><span class="cx">         }
</span><del>-        update_option( 'allowedthemes',  $allowedthemes );
-
</del><ins>+        
+        update_option( 'allowedthemes', $allowed_themes );
</ins><span class="cx">         restore_current_blog();
</span><del>-        wp_redirect( add_query_arg( array( 'update' =&gt; 'updated', 'id' =&gt; $id ), 'site-themes.php') );
</del><ins>+        
+        wp_redirect( wp_get_referer() ); // @todo add_query_arg for update message
+        exit;        
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-if ( isset($_GET['update']) ) {
-        $messages = array();
-        if ( 'updated' == $_GET['update'] )
-                $messages[] = __('Site users updated.');
-}
-
</del><span class="cx"> $title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id));
</span><span class="cx"> $parent_file = 'sites.php';
</span><span class="cx"> $submenu_file = 'sites.php';
</span><span class="cx"> 
</span><span class="cx"> require('../admin-header.php');
</span><span class="cx"> 
</span><ins>+add_thickbox();
+
+add_screen_option( 'per_page', array('label' =&gt; _x( 'Themes', 'themes per page (screen options)' ), 'default' =&gt; 999) );
+
+require_once(ABSPATH . 'wp-admin/admin-header.php');
</ins><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;wrap&quot;&gt;
</span><span class="lines">@@ -73,48 +108,22 @@
</span><span class="cx"> }
</span><span class="cx"> ?&gt;
</span><span class="cx"> &lt;/h3&gt;
</span><ins>+&lt;p class=&quot;description&quot;&gt;&lt;?php _e( 'Network enabled themes are not shown on this screen.' ) ?&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;?php
</span><span class="cx"> if ( ! empty( $messages ) ) {
</span><span class="cx">         foreach ( $messages as $msg )
</span><span class="cx">                 echo '&lt;div id=&quot;message&quot; class=&quot;updated&quot;&gt;&lt;p&gt;' . $msg . '&lt;/p&gt;&lt;/div&gt;';
</span><del>-} ?&gt;
</del><ins>+}
+
+$wp_list_table-&gt;views(); ?&gt;
+
</ins><span class="cx"> &lt;form method=&quot;post&quot; action=&quot;site-themes.php?action=update-site&quot;&gt;
</span><span class="cx">         &lt;?php wp_nonce_field( 'edit-site' ); ?&gt;
</span><span class="cx">         &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo esc_attr( $id ) ?&gt;&quot; /&gt;
</span><del>-&lt;?php
-$themes = get_themes();
-$blog_allowed_themes = wpmu_get_blog_allowedthemes( $id );
-$allowed_themes = get_site_option( 'allowedthemes' );
</del><span class="cx"> 
</span><del>-if ( ! $allowed_themes )
-        $allowed_themes = array_keys( $themes );
</del><ins>+&lt;?php $wp_list_table-&gt;display(); ?&gt;
</ins><span class="cx"> 
</span><del>-$out = '';
-foreach ( $themes as $key =&gt; $theme ) {
-        $theme_key = esc_html( $theme['Stylesheet'] );
-        if ( ! isset( $allowed_themes[$theme_key] ) ) {
-                $checked = isset( $blog_allowed_themes[ $theme_key ] ) ? 'checked=&quot;checked&quot;' : '';
-                $out .= '&lt;tr class=&quot;form-field form-required&quot;&gt;
-                                &lt;th title=&quot;' . esc_attr( $theme[&quot;Description&quot;] ).'&quot; scope=&quot;row&quot;&gt;' . esc_html( $key ) . '&lt;/th&gt;
-                                &lt;td&gt;&lt;label&gt;&lt;input name=&quot;theme[' . esc_attr( $theme_key ) . ']&quot; type=&quot;checkbox&quot; style=&quot;width:20px;&quot; value=&quot;on&quot; '.$checked.'/&gt; ' . __( 'Active' ) . '&lt;/label&gt;&lt;/td&gt;
-                        &lt;/tr&gt;';
-        }
-}
-
-if ( $out != '' ) {
-?&gt;
-&lt;p class=&quot;description&quot;&gt;&lt;?php _e( 'Activate the themename of an existing theme and hit &quot;Update Options&quot; to allow the theme for this site.' ) ?&gt;&lt;/p&gt;
-&lt;table class=&quot;form-table&quot;&gt;
-&lt;?php echo $out; ?&gt;
-&lt;/table&gt;
-&lt;?php
-submit_button();
-} else {
-        _e('All themes are allowed.');
-}
-?&gt;
</del><span class="cx"> &lt;/form&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;/div&gt;
</span><del>-&lt;?php
-require('../admin-footer.php');
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;?php include(ABSPATH . 'wp-admin/admin-footer.php'); ?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminnetworkthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/themes.php (16241 => 16242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/themes.php        2010-11-08 19:40:05 UTC (rev 16241)
+++ trunk/wp-admin/network/themes.php        2010-11-08 21:52:54 UTC (rev 16242)
</span><span class="lines">@@ -17,24 +17,24 @@
</span><span class="cx"> $s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
</span><span class="cx"> 
</span><span class="cx"> // Clean up request URI from temporary args for screen options/paging uri's to work as expected.
</span><del>-$_SERVER['REQUEST_URI'] = remove_query_arg(array('network-enable', 'network-disable', 'network-enable-selected', 'network-disable-selected'), $_SERVER['REQUEST_URI']);
</del><ins>+$_SERVER['REQUEST_URI'] = remove_query_arg(array('enable', 'disable', 'enable-selected', 'disable-selected'), $_SERVER['REQUEST_URI']);
</ins><span class="cx"> 
</span><span class="cx"> if ( $action ) {
</span><span class="cx">         $allowed_themes = get_site_option( 'allowedthemes' );        
</span><span class="cx">         switch ( $action ) {
</span><del>-                case 'network-enable':
</del><ins>+                case 'enable':
</ins><span class="cx">                         $allowed_themes[ $_GET['theme'] ] = true;
</span><span class="cx">                         update_site_option( 'allowedthemes', $allowed_themes );
</span><span class="cx">                         wp_redirect( wp_get_referer() ); // @todo add_query_arg for update message
</span><span class="cx">                         exit;                        
</span><span class="cx">                         break;
</span><del>-                case 'network-disable':
</del><ins>+                case 'disable':
</ins><span class="cx">                         unset( $allowed_themes[ $_GET['theme'] ] );
</span><span class="cx">                         update_site_option( 'allowedthemes', $allowed_themes );
</span><span class="cx">                         wp_redirect( wp_get_referer() ); // @todo add_query_arg for update message
</span><span class="cx">                         exit;
</span><span class="cx">                         break;
</span><del>-                case 'network-enable-selected':
</del><ins>+                case 'enable-selected':
</ins><span class="cx">                         $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
</span><span class="cx">                         if ( empty($themes) ) {
</span><span class="cx">                                 wp_redirect( wp_get_referer() );
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">                                 $allowed_themes[ $theme ] = true;
</span><span class="cx">                         update_site_option( 'allowedthemes', $allowed_themes );
</span><span class="cx">                         break;
</span><del>-                case 'network-disable-selected':
</del><ins>+                case 'disable-selected':
</ins><span class="cx">                         $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
</span><span class="cx">                         if ( empty($themes) ) {
</span><span class="cx">                                 wp_redirect( wp_get_referer() );
</span><span class="lines">@@ -81,7 +81,6 @@
</span><span class="cx"> &lt;div class=&quot;wrap&quot;&gt;
</span><span class="cx"> &lt;?php screen_icon('themes'); ?&gt;
</span><span class="cx"> &lt;h2&gt;&lt;?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?&gt; &lt;a href=&quot;theme-install.php&quot; class=&quot;button add-new-h2&quot;&gt;&lt;?php echo esc_html_x('Add New', 'theme'); ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/h2&gt;
</span><del>-&lt;p&gt;&lt;?php _e( 'Themes must be enabled for your network before they will be available to individual sites.' ) ?&gt;&lt;/p&gt;
</del><span class="cx"> 
</span><span class="cx"> &lt;form method=&quot;get&quot; action=&quot;&quot;&gt;
</span><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span></span></pre>
</div>
</div>

</body>
</html>