List Tables: only hide bulk actions when there are no items, don't hide all of the extra table nav.

Fixes #33824.


git-svn-id: https://develop.svn.wordpress.org/trunk@34707 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-09-30 00:46:15 +00:00
parent 2b8df0b47a
commit 27bc50cef8
2 changed files with 4 additions and 4 deletions

View File

@ -1141,13 +1141,14 @@ class WP_List_Table {
if ( 'top' === $which ) {
wp_nonce_field( 'bulk-' . $this->_args['plural'] );
}
if ( $this->has_items() ) : ?>
?>
<div class="tablenav <?php echo esc_attr( $which ); ?>">
<?php if ( $this->has_items() ): ?>
<div class="alignleft actions bulkactions">
<?php $this->bulk_actions( $which ); ?>
</div>
<?php
<?php endif;
$this->extra_tablenav( $which );
$this->pagination( $which );
?>
@ -1155,7 +1156,6 @@ class WP_List_Table {
<br class="clear" />
</div>
<?php
endif;
}
/**

View File

@ -217,7 +217,7 @@ class WP_Users_List_Table extends WP_List_Table {
$id = 'bottom' === $which ? 'new_role2' : 'new_role';
?>
<div class="alignleft actions">
<?php if ( current_user_can( 'promote_users' ) ) : ?>
<?php if ( current_user_can( 'promote_users' ) && $this->has_items() ) : ?>
<label class="screen-reader-text" for="<?php echo $id ?>"><?php _e( 'Change role to&hellip;' ) ?></label>
<select name="<?php echo $id ?>" id="<?php echo $id ?>">
<option value=""><?php _e( 'Change role to&hellip;' ) ?></option>