<!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>[12781] trunk/wp-admin: Screen icons for site admin pages.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12781">12781</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-20 22:35:21 +0000 (Wed, 20 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Screen icons for site admin pages. Using temp icon until new ones are done. see <a href="http://trac.wordpress.org/ticket/11644">#11644</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminmsadminphp">trunk/wp-admin/ms-admin.php</a></li>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
<li><a href="#trunkwpadminmsthemesphp">trunk/wp-admin/ms-themes.php</a></li>
<li><a href="#trunkwpadminmsupgradesitephp">trunk/wp-admin/ms-upgrade-site.php</a></li>
<li><a href="#trunkwpadminmsusersphp">trunk/wp-admin/ms-users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/includes/template.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -3747,7 +3747,12 @@
</span><span class="cx">                         $name = $screen->parent_base;
</span><span class="cx">                 else
</span><span class="cx">                         $name = $screen->base;
</span><ins>+
+                // @todo Remove this once we have a site admin icon
+                if ( 'ms-admin' == $screen->parent_base )
+                        $name = 'tools';
</ins><span class="cx">         }
</span><ins>+
</ins><span class="cx"> ?>
</span><span class="cx">         <div id="icon-<?php echo $name; ?>" class="icon32"><br /></div>
</span><span class="cx"> <?php
</span></span></pre></div>
<a id="trunkwpadminmsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-admin.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-admin.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/ms-admin.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><ins>+        <?php screen_icon(); ?>
</ins><span class="cx">         <h2><?php echo esc_html( $title ); ?></h2>
</span><span class="cx">
</span><span class="cx">         <ul class="subsubsub">
</span></span></pre></div>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/ms-options.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><ins>+        <?php screen_icon(); ?>
</ins><span class="cx">         <h2><?php _e('Site Options') ?></h2>
</span><span class="cx">         <form method="post" action="ms-edit.php?action=siteoptions">
</span><span class="cx">                 <?php wp_nonce_field( "siteoptions" ); ?>
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/ms-sites.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx">                 $editblog_roles = get_blog_option( $id, "{$blog_prefix}user_roles" );
</span><span class="cx">                 ?>
</span><span class="cx">                 <div class="wrap">
</span><ins>+                <?php screen_icon(); ?>
</ins><span class="cx">                 <h2><?php _e('Edit Blog'); ?> - <a href='http://<?php echo $details['domain'].$details['path']; ?>'>http://<?php echo $details['domain'].$details['path']; ?></a></h2>
</span><span class="cx">                 <form method="post" action="ms-edit.php?action=updateblog">
</span><span class="cx">                         <?php wp_nonce_field('editblog'); ?>
</span><span class="lines">@@ -369,6 +370,7 @@
</span><span class="cx">                 ?>
</span><span class="cx">
</span><span class="cx">                 <div class="wrap" style="position:relative;">
</span><ins>+                <?php screen_icon(); ?>
</ins><span class="cx">                 <h2><?php _e('Blogs') ?></h2>
</span><span class="cx">
</span><span class="cx">                 <form action="ms-sites.php" method="get" id="ms-search">
</span><span class="lines">@@ -579,6 +581,7 @@
</span><span class="cx">
</span><span class="cx">                 <div class="wrap">
</span><span class="cx">                         <a name="form-add-blog"></a>
</span><ins>+                        <?php screen_icon(); ?>
</ins><span class="cx">                         <h2><?php _e('Add Blog') ?></h2>
</span><span class="cx">                         <form method="post" action="ms-edit.php?action=addblog">
</span><span class="cx">                                 <?php wp_nonce_field('add-blog') ?>
</span></span></pre></div>
<a id="trunkwpadminmsthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-themes.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-themes.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/ms-themes.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> ?>
</span><span class="cx"> <div class="wrap">
</span><span class="cx">         <form action='ms-edit.php?action=updatethemes' method='post'>
</span><ins>+                <?php screen_icon(); ?>
</ins><span class="cx">                 <h2><?php _e('Site Themes') ?></h2>
</span><span class="cx">                 <p><?php _e('Disable themes site-wide. You can enable themes on a site by site basis.') ?></p>
</span><span class="cx">                 <table class="widefat">
</span></span></pre></div>
<a id="trunkwpadminmsupgradesitephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-upgrade-site.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-upgrade-site.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/ms-upgrade-site.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -14,6 +14,7 @@
</span><span class="cx">         wp_die( __('You do not have permission to access this page.') );
</span><span class="cx">
</span><span class="cx"> echo '<div class="wrap">';
</span><ins>+screen_icon();
</ins><span class="cx"> echo '<h2>'.__('Upgrade Site').'</h2>';
</span><span class="cx"> switch( $_GET['action'] ) {
</span><span class="cx">         case "upgrade":
</span></span></pre></div>
<a id="trunkwpadminmsusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-users.php (12780 => 12781)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-users.php        2010-01-20 22:11:02 UTC (rev 12780)
+++ trunk/wp-admin/ms-users.php        2010-01-20 22:35:21 UTC (rev 12781)
</span><span class="lines">@@ -54,29 +54,26 @@
</span><span class="cx">                 $query .= " WHERE user_login LIKE '$search' OR user_email LIKE '$search'";
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if ( !isset($_GET['sortby']) ) {
</del><ins>+        if ( !isset($_GET['sortby']) )
</ins><span class="cx">                 $_GET['sortby'] = 'id';
</span><del>-        }
</del><span class="cx">
</span><del>-        if ( $_GET['sortby'] == 'email' ) {
</del><ins>+        if ( $_GET['sortby'] == 'email' )
</ins><span class="cx">                 $query .= ' ORDER BY user_email ';
</span><del>-        } elseif ( $_GET['sortby'] == 'id' ) {
</del><ins>+        elseif ( $_GET['sortby'] == 'id' )
</ins><span class="cx">                 $query .= ' ORDER BY ID ';
</span><del>-        } elseif ( $_GET['sortby'] == 'login' ) {
</del><ins>+        elseif ( $_GET['sortby'] == 'login' )
</ins><span class="cx">                 $query .= ' ORDER BY user_login ';
</span><del>-        } elseif ( $_GET['sortby'] == 'name' ) {
</del><ins>+        elseif ( $_GET['sortby'] == 'name' )
</ins><span class="cx">                 $query .= ' ORDER BY display_name ';
</span><del>-        } elseif ( $_GET['sortby'] == 'registered' ) {
</del><ins>+        elseif ( $_GET['sortby'] == 'registered' )
</ins><span class="cx">                 $query .= ' ORDER BY user_registered ';
</span><del>-        }
</del><span class="cx">
</span><span class="cx">         $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC';
</span><span class="cx">
</span><del>-        if ( !empty( $s )) {
</del><ins>+        if ( !empty( $s ) )
</ins><span class="cx">                 $total = $wpdb->get_var( str_replace('SELECT *', 'SELECT COUNT(ID)', $query) );
</span><del>-        } else {
</del><ins>+        else
</ins><span class="cx">                 $total = $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->users}");
</span><del>-        }
</del><span class="cx">
</span><span class="cx">         $query .= " LIMIT " . intval( ( $apage - 1 ) * $num) . ", " . intval( $num );
</span><span class="cx">
</span><span class="lines">@@ -101,7 +98,8 @@
</span><span class="cx">
</span><span class="cx">         ?>
</span><span class="cx">         <div class="wrap">
</span><del>-        <h2><?php _e( $current_site->site_name ); ?> <?php _e("Users"); ?></h2>
</del><ins>+        <?php screen_icon(); ?>
+        <h2><?php esc_html_e("Users"); ?></h2>
</ins><span class="cx">         <form action="ms-users.php" method="get" class="search-form">
</span><span class="cx">                 <p class="search-box">
</span><span class="cx">                 <input type="text" name="s" value="<?php if ( isset($_GET['s']) ) esc_attr( stripslashes( $s ) ); ?>" class="search-input" id="user-search-input" />
</span></span></pre>
</div>
</div>
</body>
</html>