WordPress.org

Make WordPress Core

Changeset 16868


Ignore:
Timestamp:
12/10/2010 08:22:34 PM (7 years ago)
Author:
scribu
Message:

Don't show search box if there are no items available. See #15353

Location:
trunk/wp-admin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r16856 r16868  
    221221
    222222<form id="comments-form" action="" method="post">
     223
     224<?php if ( $wp_list_table->has_items() ) : ?>
     225
    223226<p class="search-box">
    224227    <label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>
     
    226229    <?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
    227230</p>
     231
     232<?php endif; ?>
     233
    228234<?php if ( $post_id ) : ?>
    229235<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
  • trunk/wp-admin/edit.php

    r16856 r16868  
    228228
    229229<form id="posts-filter" action="" method="get">
     230
     231<?php if ( $wp_list_table->has_items() ) : ?>
     232
    230233<p class="search-box">
    231234    <label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>
     
    234237</p>
    235238
     239<?php endif; ?>
     240
    236241<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
    237242<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
  • trunk/wp-admin/link-manager.php

    r16847 r16868  
    7676?>
    7777
    78 <form class="search-form" action="" method="get">
     78<form id="posts-filter" action="" method="post">
     79
     80<?php if ( $wp_list_table->has_items() ) : ?>
     81
    7982<p class="search-box">
    8083    <label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>
     
    8285    <?php submit_button( __( 'Search Links' ), 'button', '', false ); ?>
    8386</p>
    84 </form>
    85 <br class="clear" />
    8687
    87 <form id="posts-filter" action="" method="post">
     88<?php endif; ?>
     89
    8890<?php $wp_list_table->display(); ?>
     91
    8992<div id="ajax-response"></div>
    9093</form>
  • trunk/wp-admin/plugins.php

    r16776 r16868  
    363363<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>
    364364
    365 <form method="get" action="">
     365<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
     366
     367<?php $wp_list_table->views(); ?>
     368
     369<form method="post" action="">
     370
     371<?php if ( $wp_list_table->has_items() ) : ?>
     372
    366373<p class="search-box">
    367374    <label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label>
     
    369376    <?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?>
    370377</p>
    371 </form>
    372 
    373 <?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
    374 
    375 <?php $wp_list_table->views(); ?>
    376 
    377 <form method="post" action="">
     378
     379<?php endif; ?>
     380
    378381<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
    379382<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
  • trunk/wp-admin/upload.php

    r16333 r16868  
    203203<?php $wp_list_table->views(); ?>
    204204
    205 <form class="search-form" action="" method="get">
     205<form id="posts-filter" action="" method="post">
     206
     207<?php if ( $wp_list_table->has_items() ) : ?>
     208
    206209<p class="search-box">
    207210    <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
     
    209212    <?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?>
    210213</p>
    211 </form>
    212 
    213 <form id="posts-filter" action="" method="post">
     214
     215<?php endif; ?>
     216
    214217<?php $wp_list_table->display(); ?>
     218
    215219<div id="ajax-response"></div>
    216220<?php find_posts_div(); ?>
  • trunk/wp-admin/users.php

    r16496 r16868  
    354354<?php $wp_list_table->views(); ?>
    355355
    356 <form class="search-form" action="" method="get">
     356<form action="" method="post">
     357
     358<?php if ( $wp_list_table->has_items() ) : ?>
     359
    357360<p class="search-box">
    358361    <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>
     
    360363    <?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?>
    361364</p>
    362 </form>
    363 
    364 <form id="posts-filter" action="" method="post">
     365
     366<?php endif; ?>
     367
    365368<?php $wp_list_table->display(); ?>
    366369</form>
Note: See TracChangeset for help on using the changeset viewer.