<!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" />
<title>[22064] trunk/wp-admin/network/sites.php: Remove dupe/deprecated code from sites.php.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/22064">22064</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-09-27 17:11:07 +0000 (Thu, 27 Sep 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove dupe/deprecated code from sites.php.

Props wonderboymusic
fixes <a href="http://core.trac.wordpress.org/ticket/21553">#21553</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminnetworksitesphp">trunk/wp-admin/network/sites.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminnetworksitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/sites.php (22063 => 22064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/sites.php        2012-09-27 17:08:32 UTC (rev 22063)
+++ trunk/wp-admin/network/sites.php        2012-09-27 17:11:07 UTC (rev 22064)
</span><span class="lines">@@ -16,13 +16,13 @@
</span><span class="cx"> if ( ! current_user_can( 'manage_sites' ) )
</span><span class="cx">         wp_die( __( 'You do not have permission to access this page.' ) );
</span><span class="cx"> 
</span><del>-$wp_list_table = _get_list_table('WP_MS_Sites_List_Table');
</del><ins>+$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
</ins><span class="cx"> $pagenum = $wp_list_table-&gt;get_pagenum();
</span><span class="cx"> 
</span><span class="cx"> $title = __( 'Sites' );
</span><span class="cx"> $parent_file = 'sites.php';
</span><span class="cx"> 
</span><del>-add_screen_option( 'per_page', array('label' =&gt; _x( 'Sites', 'sites per page (screen options)' )) );
</del><ins>+add_screen_option( 'per_page', array( 'label' =&gt; _x( 'Sites', 'sites per page (screen options)' ) ) );
</ins><span class="cx"> 
</span><span class="cx"> get_current_screen()-&gt;add_help_tab( array(
</span><span class="cx">         'id'      =&gt; 'overview',
</span><span class="lines">@@ -51,55 +51,86 @@
</span><span class="cx"> if ( isset( $_GET['action'] ) ) {
</span><span class="cx">         do_action( 'wpmuadminedit' , '' );
</span><span class="cx"> 
</span><ins>+        if ( 'confirm' === $_GET['action'] ) {
+                check_admin_referer( 'confirm' );
+                
+                if ( ! headers_sent() ) {
+                        nocache_headers();
+                        header( 'Content-Type: text/html; charset=utf-8' );
+                }
+                if ( $current_site-&gt;blog_id == $id )
+                        wp_die( __( 'You are not allowed to change the current site.' ) );
+                ?&gt;
+                &lt;!DOCTYPE html&gt;
+                &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php language_attributes(); ?&gt;&gt;
+                        &lt;head&gt;
+                                &lt;title&gt;&lt;?php _e( 'WordPress &amp;rsaquo; Confirm your action' ); ?&gt;&lt;/title&gt;
+
+                                &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
+                                &lt;?php
+                                wp_admin_css( 'install', true );
+                                wp_admin_css( 'ie', true );
+                                ?&gt;
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                                &lt;h1 id=&quot;logo&quot;&gt;&lt;img alt=&quot;WordPress&quot; src=&quot;&lt;?php echo esc_attr( admin_url( 'images/wordpress-logo.png?ver=20120216' ) ); ?&gt;&quot; /&gt;&lt;/h1&gt;
+                                &lt;form action=&quot;sites.php?action=&lt;?php echo esc_attr( $_GET['action2'] ) ?&gt;&quot; method=&quot;post&quot;&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;&lt;?php echo esc_attr( $_GET['action2'] ) ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo esc_attr( $id ); ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;_wp_http_referer&quot; value=&quot;&lt;?php echo esc_attr( wp_get_referer() ); ?&gt;&quot; /&gt;
+                                        &lt;?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?&gt;
+                                        &lt;p&gt;&lt;?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?&gt;&lt;/p&gt;
+                                        &lt;?php submit_button( __('Confirm'), 'button' ); ?&gt;
+                                &lt;/form&gt;
+                        &lt;/body&gt;
+                &lt;/html&gt;
+                &lt;?php
+                exit();        
+        }
+        
+        $updated_action = '';
+        
+        $manage_actions = array( 'deleteblog', 'allblogs', 'archiveblog', 'unarchiveblog', 'activateblog', 'deactivateblog', 'unspamblog', 'spamblog', 'unmatureblog', 'matureblog' );
+        if ( in_array( $_GET['action'], $manage_actions ) ) {                
+                $action = $_GET['action'];
+                if ( 'allblogs' === $action )
+                        $action = 'bulk-sites';
+
+                check_admin_referer( $action );
+        } 
+                
</ins><span class="cx">         switch ( $_GET['action'] ) {
</span><del>-                case 'updateblog':
-                        // No longer used.
-                break;
</del><span class="cx"> 
</span><span class="cx">                 case 'deleteblog':
</span><del>-                        check_admin_referer('deleteblog');
-                        if ( ! ( current_user_can( 'manage_sites' ) &amp;&amp; current_user_can( 'delete_sites' ) ) )
</del><ins>+                        if ( ! current_user_can( 'delete_sites' ) )
</ins><span class="cx">                                 wp_die( __( 'You do not have permission to access this page.' ) );
</span><span class="cx"> 
</span><ins>+                        $updated_action = 'not_deleted';
</ins><span class="cx">                         if ( $id != '0' &amp;&amp; $id != $current_site-&gt;blog_id &amp;&amp; current_user_can( 'delete_site', $id ) ) {
</span><span class="cx">                                 wpmu_delete_blog( $id, true );
</span><del>-                                wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'delete' ), wp_get_referer() ) );
-                        } else {
-                                wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'not_deleted' ), wp_get_referer() ) );
</del><ins>+                                $updated_action = 'delete';        
</ins><span class="cx">                         }
</span><del>-
-                        exit();
</del><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">                 case 'allblogs':
</span><span class="cx">                         if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) &amp;&amp; isset( $_POST['allblogs'] ) ) {
</span><del>-                                check_admin_referer( 'bulk-sites' );
-
-                                if ( ! current_user_can( 'manage_sites' ) )
-                                        wp_die( __( 'You do not have permission to access this page.' ) );
-
</del><span class="cx">                                 $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
</span><del>-                                $blogfunction = '';
-
</del><ins>+                                
</ins><span class="cx">                                 foreach ( (array) $_POST['allblogs'] as $key =&gt; $val ) {
</span><span class="cx">                                         if ( $val != '0' &amp;&amp; $val != $current_site-&gt;blog_id ) {
</span><span class="cx">                                                 switch ( $doaction ) {
</span><span class="cx">                                                         case 'delete':
</span><span class="cx">                                                                 if ( ! current_user_can( 'delete_site', $val ) )
</span><span class="cx">                                                                         wp_die( __( 'You are not allowed to delete the site.' ) );
</span><del>-                                                                $blogfunction = 'all_delete';
</del><ins>+                                                                
+                                                                $updated_action = 'all_delete';
</ins><span class="cx">                                                                 wpmu_delete_blog( $val, true );
</span><span class="cx">                                                         break;
</span><span class="cx"> 
</span><span class="cx">                                                         case 'spam':
</span><del>-                                                                $blogfunction = 'all_spam';
-                                                                update_blog_status( $val, 'spam', '1' );
-                                                                set_time_limit( 60 );
-                                                        break;
-
</del><span class="cx">                                                         case 'notspam':
</span><del>-                                                                $blogfunction = 'all_notspam';
-                                                                update_blog_status( $val, 'spam', '0' );
</del><ins>+                                                                $updated_action = ( 'spam' === $doaction ) ? 'all_spam' : 'all_notspam';
+                                                                update_blog_status( $val, 'spam', ( 'spam' === $doaction ) ? '1' : '0' );
</ins><span class="cx">                                                                 set_time_limit( 60 );
</span><span class="cx">                                                         break;
</span><span class="cx">                                                 }
</span><span class="lines">@@ -107,138 +138,50 @@
</span><span class="cx">                                                 wp_die( __( 'You are not allowed to change the current site.' ) );
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><del>-
-                                wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; $blogfunction ), wp_get_referer() ) );
</del><span class="cx">                         } else {
</span><span class="cx">                                 wp_redirect( network_admin_url( 'sites.php' ) );
</span><ins>+                                exit();
</ins><span class="cx">                         }
</span><del>-                        exit();
</del><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">                 case 'archiveblog':
</span><del>-                        check_admin_referer( 'archiveblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
-                        update_blog_status( $id, 'archived', '1' );
-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'archive' ), wp_get_referer() ) );
-                        exit();
-                break;
-
</del><span class="cx">                 case 'unarchiveblog':
</span><del>-                        check_admin_referer( 'unarchiveblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
-                        update_blog_status( $id, 'archived', '0' );
-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'unarchive' ), wp_get_referer() ) );
-                        exit();
</del><ins>+                        update_blog_status( $id, 'archived', ( 'archiveblog' === $_GET['action'] ) ? '1' : '0' );
</ins><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">                 case 'activateblog':
</span><del>-                        check_admin_referer( 'activateblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
</del><span class="cx">                         update_blog_status( $id, 'deleted', '0' );
</span><span class="cx">                         do_action( 'activate_blog', $id );
</span><del>-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'activate' ), wp_get_referer() ) );
-                        exit();
</del><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">                 case 'deactivateblog':
</span><del>-                        check_admin_referer( 'deactivateblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
</del><span class="cx">                         do_action( 'deactivate_blog', $id );
</span><span class="cx">                         update_blog_status( $id, 'deleted', '1' );
</span><del>-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'deactivate' ), wp_get_referer() ) );
-                        exit();
</del><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">                 case 'unspamblog':
</span><del>-                        check_admin_referer( 'unspamblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
-                        update_blog_status( $id, 'spam', '0' );
-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'unspam' ), wp_get_referer() ) );
-                        exit();
-                break;
-
</del><span class="cx">                 case 'spamblog':
</span><del>-                        check_admin_referer( 'spamblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
-                        update_blog_status( $id, 'spam', '1' );
-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'spam' ), wp_get_referer() ) );
-                        exit();
</del><ins>+                        update_blog_status( $id, 'spam', ( 'spamblog' === $_GET['action'] ) ? '1' : '0' );
</ins><span class="cx">                 break;
</span><del>-
</del><ins>+        
</ins><span class="cx">                 case 'unmatureblog':
</span><del>-                        check_admin_referer( 'unmatureblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
-                        update_blog_status( $id, 'mature', '0' );
-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'unmature' ), wp_get_referer() ) );
-                        exit();
-                break;
-
</del><span class="cx">                 case 'matureblog':
</span><del>-                        check_admin_referer( 'matureblog' );
-                        if ( ! current_user_can( 'manage_sites' ) )
-                                wp_die( __( 'You do not have permission to access this page.' ) );
-
-                        update_blog_status( $id, 'mature', '1' );
-                        wp_safe_redirect( add_query_arg( array( 'updated' =&gt; 'true', 'action' =&gt; 'mature' ), wp_get_referer() ) );
-                        exit();
</del><ins>+                        update_blog_status( $id, 'mature', ( 'matureblog' === $_GET['action'] ) ? '1' : '0' );
</ins><span class="cx">                 break;
</span><del>-
-                // Common
-                case 'confirm':
-                        check_admin_referer( 'confirm' );
-                        if ( !headers_sent() ) {
-                                nocache_headers();
-                                header( 'Content-Type: text/html; charset=utf-8' );
-                        }
-                        if ( $current_site-&gt;blog_id == $id )
-                                wp_die( __( 'You are not allowed to change the current site.' ) );
-                        ?&gt;
-                        &lt;!DOCTYPE html&gt;
-                        &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php language_attributes(); ?&gt;&gt;
-                                &lt;head&gt;
-                                        &lt;title&gt;&lt;?php _e( 'WordPress &amp;rsaquo; Confirm your action' ); ?&gt;&lt;/title&gt;
-
-                                        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
-                                        &lt;?php
-                                        wp_admin_css( 'install', true );
-                                        wp_admin_css( 'ie', true );
-                                        ?&gt;
-                                &lt;/head&gt;
-                                &lt;body&gt;
-                                        &lt;h1 id=&quot;logo&quot;&gt;&lt;img alt=&quot;WordPress&quot; src=&quot;&lt;?php echo esc_attr( admin_url( 'images/wordpress-logo.png?ver=20120216' ) ); ?&gt;&quot; /&gt;&lt;/h1&gt;
-                                        &lt;form action=&quot;sites.php?action=&lt;?php echo esc_attr( $_GET['action2'] ) ?&gt;&quot; method=&quot;post&quot;&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;&lt;?php echo esc_attr( $_GET['action2'] ) ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo esc_attr( $id ); ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;_wp_http_referer&quot; value=&quot;&lt;?php echo esc_attr( wp_get_referer() ); ?&gt;&quot; /&gt;
-                                                &lt;?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?&gt;
-                                                &lt;p&gt;&lt;?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?&gt;&lt;/p&gt;
-                                                &lt;?php submit_button( __('Confirm'), 'button' ); ?&gt;
-                                        &lt;/form&gt;
-                                &lt;/body&gt;
-                        &lt;/html&gt;
-                        &lt;?php
-                        exit();
-                break;
</del><span class="cx">         }
</span><ins>+        
+        if ( empty( $updated_action ) &amp;&amp; in_array( $_GET['action'], $manage_actions ) )
+                $updated_action = $_GET['action'];
+        
+        if ( ! empty( $updated_action ) ) {
+                wp_safe_redirect( add_query_arg( array( 'updated' =&gt; $updated_action ), wp_get_referer() ) );
+                exit();
+        }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> $msg = '';
</span><del>-if ( isset( $_REQUEST['updated'] ) &amp;&amp; $_REQUEST['updated'] == 'true' &amp;&amp; ! empty( $_REQUEST['action'] ) ) {
-        switch ( $_REQUEST['action'] ) {
</del><ins>+if ( isset( $_GET['updated'] ) ) {
+        switch ( $_GET['updated'] ) {
</ins><span class="cx">                 case 'all_notspam':
</span><span class="cx">                         $msg = __( 'Sites removed from spam.' );
</span><span class="cx">                 break;
</span><span class="lines">@@ -254,29 +197,30 @@
</span><span class="cx">                 case 'not_deleted':
</span><span class="cx">                         $msg = __( 'You do not have permission to delete that site.' );
</span><span class="cx">                 break;
</span><del>-                case 'archive':
</del><ins>+                case 'archiveblog':
</ins><span class="cx">                         $msg = __( 'Site archived.' );
</span><span class="cx">                 break;
</span><del>-                case 'unarchive':
</del><ins>+                case 'unarchiveblog':
</ins><span class="cx">                         $msg = __( 'Site unarchived.' );
</span><span class="cx">                 break;
</span><del>-                case 'activate':
</del><ins>+                case 'activateblog':
</ins><span class="cx">                         $msg = __( 'Site activated.' );
</span><span class="cx">                 break;
</span><del>-                case 'deactivate':
</del><ins>+                case 'deactivateblog':
</ins><span class="cx">                         $msg = __( 'Site deactivated.' );
</span><span class="cx">                 break;
</span><del>-                case 'unspam':
</del><ins>+                case 'unspamblog':
</ins><span class="cx">                         $msg = __( 'Site removed from spam.' );
</span><span class="cx">                 break;
</span><del>-                case 'spam':
</del><ins>+                case 'spamblog':
</ins><span class="cx">                         $msg = __( 'Site marked as spam.' );
</span><span class="cx">                 break;
</span><span class="cx">                 default:
</span><del>-                        $msg = apply_filters( 'network_sites_updated_message_' . $_REQUEST['action'] , __( 'Settings saved.' ) );
</del><ins>+                        $msg = apply_filters( 'network_sites_updated_message_' . $_GET['updated'], __( 'Settings saved.' ) );
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><del>-        if ( $msg )
</del><ins>+        
+        if ( ! empty( $msg ) )
</ins><span class="cx">                 $msg = '&lt;div class=&quot;updated&quot; id=&quot;message&quot;&gt;&lt;p&gt;' . $msg . '&lt;/p&gt;&lt;/div&gt;';
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -286,11 +230,11 @@
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;wrap&quot;&gt;
</span><del>-&lt;?php screen_icon('ms-admin'); ?&gt;
-&lt;h2&gt;&lt;?php _e('Sites') ?&gt;
-&lt;?php echo $msg; ?&gt;
</del><ins>+&lt;?php screen_icon( 'ms-admin' ); ?&gt;
+&lt;h2&gt;&lt;?php _e( 'Sites' ) ?&gt;
+        
</ins><span class="cx"> &lt;?php if ( current_user_can( 'create_sites') ) : ?&gt;
</span><del>-        &lt;a href=&quot;&lt;?php echo network_admin_url('site-new.php'); ?&gt;&quot; class=&quot;add-new-h2&quot;&gt;&lt;?php echo esc_html_x( 'Add New', 'site' ); ?&gt;&lt;/a&gt;
</del><ins>+        &lt;a href=&quot;&lt;?php echo network_admin_url('site-new.php'); ?&gt;&quot; class=&quot;add-new-h2&quot;&gt;&lt;?php echo esc_html_x( 'Add New', 'site' ); ?&gt;&lt;/a&gt;
</ins><span class="cx"> &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;?php if ( isset( $_REQUEST['s'] ) &amp;&amp; $_REQUEST['s'] ) {
</span><span class="lines">@@ -298,6 +242,8 @@
</span><span class="cx"> } ?&gt;
</span><span class="cx"> &lt;/h2&gt;
</span><span class="cx"> 
</span><ins>+&lt;?php echo $msg; ?&gt;        
+        
</ins><span class="cx"> &lt;form action=&quot;&quot; method=&quot;get&quot; id=&quot;ms-search&quot;&gt;
</span><span class="cx"> &lt;?php $wp_list_table-&gt;search_box( __( 'Search Sites' ), 'site' ); ?&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;blogs&quot; /&gt;
</span></span></pre>
</div>
</div>

</body>
</html>