WP_List_Table::display_tablenav() WordPress Method
The WP_List_Table::display_tablenav() method is used to display the table navigation controls at the top and bottom of the list table. The method takes two arguments: $which (string) (required) Which tablenav to display. Valid values are 'top' or 'bottom'. $args (array) (optional) Default array. The display_tablenav() method is called by the display() method when the list table is being displayed. The $which argument is used to determine which set of navigation controls to display. The $args array is used to pass additional arguments to the display_tablenav() method.
WP_List_Table::display_tablenav( string $which ) #
Generates the table navigation above or below the table
Parameters
- $which
(string)(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
1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 | 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 } |
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |