Don't show search box if there are no items available. See #15353
git-svn-id: http://svn.automattic.com/wordpress/trunk@16868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6634bd0314
commit
3f2c0aff8a
|
@ -220,11 +220,17 @@ if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQU
|
||||||
<?php $wp_list_table->views(); ?>
|
<?php $wp_list_table->views(); ?>
|
||||||
|
|
||||||
<form id="comments-form" action="" method="post">
|
<form id="comments-form" action="" method="post">
|
||||||
|
|
||||||
|
<?php if ( $wp_list_table->has_items() ) : ?>
|
||||||
|
|
||||||
<p class="search-box">
|
<p class="search-box">
|
||||||
<label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>
|
<label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>
|
||||||
<input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
<input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
||||||
<?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
|
<?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( $post_id ) : ?>
|
<?php if ( $post_id ) : ?>
|
||||||
<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
|
<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -227,12 +227,17 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated'
|
||||||
<?php $wp_list_table->views(); ?>
|
<?php $wp_list_table->views(); ?>
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="get">
|
<form id="posts-filter" action="" method="get">
|
||||||
|
|
||||||
|
<?php if ( $wp_list_table->has_items() ) : ?>
|
||||||
|
|
||||||
<p class="search-box">
|
<p class="search-box">
|
||||||
<label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>
|
<label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>
|
||||||
<input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
|
<input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
|
||||||
<?php submit_button( $post_type_object->labels->search_items, 'button', 'submit', false ); ?>
|
<?php submit_button( $post_type_object->labels->search_items, 'button', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
|
<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
|
||||||
<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
|
<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
|
||||||
|
|
||||||
|
|
|
@ -75,17 +75,20 @@ if ( isset($_REQUEST['deleted']) ) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form class="search-form" action="" method="get">
|
<form id="posts-filter" action="" method="post">
|
||||||
|
|
||||||
|
<?php if ( $wp_list_table->has_items() ) : ?>
|
||||||
|
|
||||||
<p class="search-box">
|
<p class="search-box">
|
||||||
<label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>
|
<label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>
|
||||||
<input type="text" id="link-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
<input type="text" id="link-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
||||||
<?php submit_button( __( 'Search Links' ), 'button', '', false ); ?>
|
<?php submit_button( __( 'Search Links' ), 'button', '', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
|
||||||
<br class="clear" />
|
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="post">
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $wp_list_table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
|
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -362,19 +362,22 @@ if ( !empty($invalid) )
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php echo esc_html( $title ); if ( current_user_can('install_plugins') ) { ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a><?php } ?></h2>
|
<h2><?php echo esc_html( $title ); if ( current_user_can('install_plugins') ) { ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a><?php } ?></h2>
|
||||||
|
|
||||||
<form method="get" action="">
|
|
||||||
<p class="search-box">
|
|
||||||
<label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label>
|
|
||||||
<input type="text" id="plugin-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
|
||||||
<?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?>
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
|
<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
|
||||||
|
|
||||||
<?php $wp_list_table->views(); ?>
|
<?php $wp_list_table->views(); ?>
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
|
|
||||||
|
<?php if ( $wp_list_table->has_items() ) : ?>
|
||||||
|
|
||||||
|
<p class="search-box">
|
||||||
|
<label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label>
|
||||||
|
<input type="text" id="plugin-search-input" name="s" value="<?php _admin_search_query(); ?>" />
|
||||||
|
<?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
|
<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
|
||||||
<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
|
<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
|
||||||
|
|
||||||
|
|
|
@ -202,16 +202,20 @@ if ( !empty($message) ) { ?>
|
||||||
|
|
||||||
<?php $wp_list_table->views(); ?>
|
<?php $wp_list_table->views(); ?>
|
||||||
|
|
||||||
<form class="search-form" action="" method="get">
|
<form id="posts-filter" action="" method="post">
|
||||||
|
|
||||||
|
<?php if ( $wp_list_table->has_items() ) : ?>
|
||||||
|
|
||||||
<p class="search-box">
|
<p class="search-box">
|
||||||
<label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
|
<label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
|
||||||
<input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
|
<input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
|
||||||
<?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?>
|
<?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="post">
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $wp_list_table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
|
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
<?php find_posts_div(); ?>
|
<?php find_posts_div(); ?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
|
@ -353,15 +353,18 @@ if ( $usersearch )
|
||||||
|
|
||||||
<?php $wp_list_table->views(); ?>
|
<?php $wp_list_table->views(); ?>
|
||||||
|
|
||||||
<form class="search-form" action="" method="get">
|
<form action="" method="post">
|
||||||
|
|
||||||
|
<?php if ( $wp_list_table->has_items() ) : ?>
|
||||||
|
|
||||||
<p class="search-box">
|
<p class="search-box">
|
||||||
<label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>
|
<label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>
|
||||||
<input type="text" id="user-search-input" name="s" value="<?php echo esc_attr($usersearch); ?>" />
|
<input type="text" id="user-search-input" name="s" value="<?php echo esc_attr($usersearch); ?>" />
|
||||||
<?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?>
|
<?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="post">
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $wp_list_table->display(); ?>
|
<?php $wp_list_table->display(); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue