<!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>[16607] trunk:
Make the list of actions that can be performed on a site in the User List in Network admin filterable
.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16607">16607</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2010-11-29 13:31:42 +0000 (Mon, 29 Nov 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make the list of actions that can be performed on a site in the User List in Network admin filterable.
Add classes for all core site status types to the view url.
Move the CSS to a css file rather than including it inline.
See <a href="http://trac.wordpress.org/ticket/15558">#15558</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincssmscss">trunk/wp-admin/css/ms.css</a></li>
<li><a href="#trunkwpadmincssmsdevcss">trunk/wp-admin/css/ms.dev.css</a></li>
<li><a href="#trunkwpadminincludesclasswpmsuserslisttablephp">trunk/wp-admin/includes/class-wp-ms-users-list-table.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincssmscss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/ms.css (16606 => 16607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/ms.css        2010-11-29 07:24:54 UTC (rev 16606)
+++ trunk/wp-admin/css/ms.css        2010-11-29 13:31:42 UTC (rev 16607)
</span><span class="lines">@@ -1 +1 @@
</span><del>-#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;padding-left:16px;position:static;}#dashboard_right_now td.b a.musublink{font-size:16px;}#dashboard_right_now div.musubtable{border-top:none;}#dashboard_right_now div.musubtable .t{white-space:normal;}.ms-sites-php .postbox h3{cursor:auto;}.ms-sites-php .postbox .description{margin:10px 0 0;padding:0 10px 10px;border-bottom:1px solid #DFDFDF;}tr.site-deleted{background:#ff8573;}tr.site-spammed{background:#faa;}tr.site-archived{background:#ffebe8;}tr.site-mature{background:#fecac2;}
</del><span class="cx">\ No newline at end of file
</span><ins>+#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;padding-left:16px;position:static;}#dashboard_right_now td.b a.musublink{font-size:16px;}#dashboard_right_now div.musubtable{border-top:none;}#dashboard_right_now div.musubtable .t{white-space:normal;}.ms-sites-php .postbox h3{cursor:auto;}.ms-sites-php .postbox .description{margin:10px 0 0;padding:0 10px 10px;border-bottom:1px solid #DFDFDF;}tr.site-deleted,a.site-deleted{background:#ff8573;}tr.site-spammed,a.site-spammed{background:#faa;}tr.site-archived,a.site-archived{background:#ffebe8;}tr.site-mature,a.site-mature{background:#fecac2;}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadmincssmsdevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/ms.dev.css (16606 => 16607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/ms.dev.css        2010-11-29 07:24:54 UTC (rev 16606)
+++ trunk/wp-admin/css/ms.dev.css        2010-11-29 13:31:42 UTC (rev 16607)
</span><span class="lines">@@ -30,15 +30,16 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* Background Color for Site Status */
</span><del>-tr.site-deleted {
</del><ins>+tr.site-deleted, a.site-deleted {
</ins><span class="cx">         background: #ff8573;
</span><span class="cx"> }
</span><del>-tr.site-spammed {
</del><ins>+tr.site-spammed, a.site-spammed {
</ins><span class="cx">         background: #faa;
</span><span class="cx"> }
</span><del>-tr.site-archived {
</del><ins>+tr.site-archived, a.site-archived {
</ins><span class="cx">         background:#ffebe8;
</span><span class="cx"> }
</span><del>-tr.site-mature {
</del><ins>+tr.site-mature, a.site-mature {
</ins><span class="cx">         background: #fecac2;
</span><span class="cx"> }
</span><ins>+
</ins></span></pre></div>
<a id="trunkwpadminincludesclasswpmsuserslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-ms-users-list-table.php (16606 => 16607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-ms-users-list-table.php        2010-11-29 07:24:54 UTC (rev 16606)
+++ trunk/wp-admin/includes/class-wp-ms-users-list-table.php        2010-11-29 13:31:42 UTC (rev 16607)
</span><span class="lines">@@ -217,20 +217,36 @@
</span><span class="cx">                                                 echo "<td $attributes>";
</span><span class="cx">                                                         if ( is_array( $blogs ) ) {
</span><span class="cx">                                                                 foreach ( (array) $blogs as $key => $val ) {
</span><del>-                                                                        $path        = ( $val->path == '/' ) ? '' : $val->path;
</del><ins>+                                                                        if ( $current_site->id != $val->site_id ) continue;
+                                                                        
+                                                                                $path        = ( $val->path == '/' ) ? '' : $val->path;
</ins><span class="cx">                                                                         echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>';
</span><span class="cx">                                                                         echo ' <small class="row-actions">';
</span><del>-
-                                                                        // Edit
-                                                                        echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a> | ';
-
-                                                                        // View
-                                                                        echo '<a ';
</del><ins>+                                                                        $actions = array();
+                                                                        $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
+                                                                        
+                                                                        $class = '';
</ins><span class="cx">                                                                         if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
</span><del>-                                                                                echo 'style="background-color: #faa" ';
-                                                                        echo 'href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
-
-                                                                        echo '</small><br />';
</del><ins>+                                                                                $class .= 'site-spammed ';
+                                                                        if ( get_blog_status( $val->userblog_id, 'mature' ) == 1 )
+                                                                                $class .= 'site-mature ';
+                                                                        if ( get_blog_status( $val->userblog_id, 'deleted' ) == 1 )
+                                                                                $class .= 'site-deleted ';
+                                                                        if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 )
+                                                                                $class .= 'site-archived ';
+                                                                        
+                                                                        $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
+                                                                        
+                                                                        $actions = apply_filters('ms_user_list_site_actions', $actions, $val->userblog_id);
+                                                                        
+                                                                        $i=0;
+                                                                        $action_count = count( $actions );
+                                                                        foreach ( $actions as $action => $link ) {
+                                                                                ++$i;
+                                                                                ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
+                                                                                echo "<span class='$action'>$link$sep</span>";
+                                                                        }
+                                                                        echo '</small><br/>';
</ins><span class="cx">                                                                 }
</span><span class="cx">                                                         }
</span><span class="cx">                                                         ?>
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (16606 => 16607)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-11-29 07:24:54 UTC (rev 16606)
+++ trunk/wp-includes/script-loader.php        2010-11-29 13:31:42 UTC (rev 16607)
</span><span class="lines">@@ -500,7 +500,7 @@
</span><span class="cx">         $styles->add( 'colors-fresh', "/wp-admin/css/colors-fresh$suffix.css", array(), $colors_version );
</span><span class="cx">         $styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version );
</span><span class="cx">
</span><del>-        $styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20100528' );
</del><ins>+        $styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20101129' );
</ins><span class="cx">         $styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20101105' );
</span><span class="cx">         $styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20101020' );
</span><span class="cx">         $styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20100610' );
</span></span></pre>
</div>
</div>
</body>
</html>