<!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>[16868] trunk/wp-admin: Don'
 t show search box if there are no items available.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16868">16868</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-12-10 20:22:34 +0000 (Fri, 10 Dec 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Don't show search box if there are no items available. See <a href="http://trac.wordpress.org/ticket/15353">#15353</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminlinkmanagerphp">trunk/wp-admin/link-manager.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/edit-comments.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -220,11 +220,17 @@
</span><span class="cx"> &lt;?php $wp_list_table-&gt;views(); ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;form id=&quot;comments-form&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
</span><ins>+
+&lt;?php if ( $wp_list_table-&gt;has_items() ) : ?&gt;
+
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;comment-search-input&quot;&gt;&lt;?php _e( 'Search Comments' ); ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;comment-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php _admin_search_query(); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span><ins>+
+&lt;?php endif; ?&gt;
+
</ins><span class="cx"> &lt;?php if ( $post_id ) : ?&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;p&quot; value=&quot;&lt;?php echo esc_attr( intval( $post_id ) ); ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;?php endif; ?&gt;
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/edit.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -227,12 +227,17 @@
</span><span class="cx"> &lt;?php $wp_list_table-&gt;views(); ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</span><ins>+
+&lt;?php if ( $wp_list_table-&gt;has_items() ) : ?&gt;
+
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;post-search-input&quot;&gt;&lt;?php echo $post_type_object-&gt;labels-&gt;search_items; ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;post-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php the_search_query(); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php submit_button( $post_type_object-&gt;labels-&gt;search_items, 'button', 'submit', false ); ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span><span class="cx"> 
</span><ins>+&lt;?php endif; ?&gt;
+
</ins><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;post_status&quot; class=&quot;post_status_page&quot; value=&quot;&lt;?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; class=&quot;post_type_page&quot; value=&quot;&lt;?php echo $post_type; ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminlinkmanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/link-manager.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/link-manager.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/link-manager.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -75,17 +75,20 @@
</span><span class="cx"> }
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><del>-&lt;form class=&quot;search-form&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</del><ins>+&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
+
+&lt;?php if ( $wp_list_table-&gt;has_items() ) : ?&gt;
+
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;link-search-input&quot;&gt;&lt;?php _e( 'Search Links' ); ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;link-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php _admin_search_query(); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php submit_button( __( 'Search Links' ), 'button', '', false ); ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span><del>-&lt;/form&gt;
-&lt;br class=&quot;clear&quot; /&gt;
</del><span class="cx"> 
</span><del>-&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
</del><ins>+&lt;?php endif; ?&gt;
+
</ins><span class="cx"> &lt;?php $wp_list_table-&gt;display(); ?&gt;
</span><ins>+
</ins><span class="cx"> &lt;div id=&quot;ajax-response&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;/form&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/plugins.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -362,19 +362,22 @@
</span><span class="cx"> &lt;?php screen_icon(); ?&gt;
</span><span class="cx"> &lt;h2&gt;&lt;?php echo esc_html( $title ); if ( current_user_can('install_plugins') ) { ?&gt; &lt;a href=&quot;plugin-install.php&quot; class=&quot;button add-new-h2&quot;&gt;&lt;?php echo esc_html_x('Add New', 'plugin'); ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/h2&gt;
</span><span class="cx"> 
</span><del>-&lt;form method=&quot;get&quot; action=&quot;&quot;&gt;
</del><ins>+&lt;?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?&gt;
+
+&lt;?php $wp_list_table-&gt;views(); ?&gt;
+
+&lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
+
+&lt;?php if ( $wp_list_table-&gt;has_items() ) : ?&gt;
+
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;plugin-search-input&quot;&gt;&lt;?php _e( 'Search Plugins' ); ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;plugin-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php _admin_search_query(); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span><del>-&lt;/form&gt;
</del><span class="cx"> 
</span><del>-&lt;?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?&gt;
</del><ins>+&lt;?php endif; ?&gt;
</ins><span class="cx"> 
</span><del>-&lt;?php $wp_list_table-&gt;views(); ?&gt;
-
-&lt;form method=&quot;post&quot; action=&quot;&quot;&gt;
</del><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;plugin_status&quot; value=&quot;&lt;?php echo esc_attr($status) ?&gt;&quot; /&gt;
</span><span class="cx"> &lt;input type=&quot;hidden&quot; name=&quot;paged&quot; value=&quot;&lt;?php echo esc_attr($page) ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/upload.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -202,16 +202,20 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;?php $wp_list_table-&gt;views(); ?&gt;
</span><span class="cx"> 
</span><del>-&lt;form class=&quot;search-form&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</del><ins>+&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
+
+&lt;?php if ( $wp_list_table-&gt;has_items() ) : ?&gt;
+
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;media-search-input&quot;&gt;&lt;?php _e( 'Search Media' ); ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;media-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php the_search_query(); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span><del>-&lt;/form&gt;
</del><span class="cx"> 
</span><del>-&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
</del><ins>+&lt;?php endif; ?&gt;
+
</ins><span class="cx"> &lt;?php $wp_list_table-&gt;display(); ?&gt;
</span><ins>+
</ins><span class="cx"> &lt;div id=&quot;ajax-response&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;?php find_posts_div(); ?&gt;
</span><span class="cx"> &lt;br class=&quot;clear&quot; /&gt;
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/users.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -353,15 +353,18 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;?php $wp_list_table-&gt;views(); ?&gt;
</span><span class="cx"> 
</span><del>-&lt;form class=&quot;search-form&quot; action=&quot;&quot; method=&quot;get&quot;&gt;
</del><ins>+&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
+
+&lt;?php if ( $wp_list_table-&gt;has_items() ) : ?&gt;
+
</ins><span class="cx"> &lt;p class=&quot;search-box&quot;&gt;
</span><span class="cx">         &lt;label class=&quot;screen-reader-text&quot; for=&quot;user-search-input&quot;&gt;&lt;?php _e( 'Search Users' ); ?&gt;:&lt;/label&gt;
</span><span class="cx">         &lt;input type=&quot;text&quot; id=&quot;user-search-input&quot; name=&quot;s&quot; value=&quot;&lt;?php echo esc_attr($usersearch); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?&gt;
</span><span class="cx"> &lt;/p&gt;
</span><del>-&lt;/form&gt;
</del><span class="cx"> 
</span><del>-&lt;form id=&quot;posts-filter&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
</del><ins>+&lt;?php endif; ?&gt;
+
</ins><span class="cx"> &lt;?php $wp_list_table-&gt;display(); ?&gt;
</span><span class="cx"> &lt;/form&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>