On this page
WP_List_Table::display_tablenav( string $which )
Generates the table navigation above or below the table
Parameters
$whichstring Required
More Information
This generates the table navigation above or below the table. Generally, you don’t need to call this explicitly as it is handled in the display() method.
Source
File: wp-admin/includes/class-wp-list-table.php. View all references
protected function display_tablenav( $which ) {
if ( 'top' === $which ) {
wp_nonce_field( 'bulk-' . $this->_args['plural'] );
}
?>
<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
endif;
$this->extra_tablenav( $which );
$this->pagination( $which );
?>
<br class="clear" />
</div>
<?php
}
Related
Uses
| Uses | Description |
|---|---|
| WP_List_Table::extra_tablenav() wp-admin/includes/class-wp-list-table.php | Extra controls to be displayed between bulk actions and pagination. |
| WP_List_Table::pagination() wp-admin/includes/class-wp-list-table.php | Displays the pagination. |
| WP_List_Table::has_items() wp-admin/includes/class-wp-list-table.php | Whether the table has items to display or not |
| WP_List_Table::bulk_actions() wp-admin/includes/class-wp-list-table.php | Displays the bulk actions dropdown. |
| wp_nonce_field() wp-includes/functions.php | Retrieves or display nonce hidden field for forms. |
| esc_attr() wp-includes/formatting.php | Escaping for HTML attributes. |
Used By
| Used By | Description |
|---|---|
| WP_List_Table::display() wp-admin/includes/class-wp-list-table.php | Displays the table. |
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_list_table/display_tablenav