WP_List_Table::pagination() – Displays the pagination.

You appear to be a bot. Output may be restricted

Description

Displays the pagination.

Usage

WP_List_Table::pagination( $which );

Parameters

$which
( string ) required

Returns

void

Source

File name: wordpress/wp-admin/includes/class-wp-list-table.php
Lines:

101 to 126 of 126
    if ( $disable_last ) {
      $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&raquo;</span>';
    } else {
      $page_links[] = sprintf(
        "<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
        esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
        __( 'Last page' ),
        '&raquo;'
      );
    }

    $pagination_links_class = 'pagination-links';
    if ( ! empty( $infinite_scroll ) ) {
      $pagination_links_class .= ' hide-if-js';
    }
    $output .= "\n<span class='$pagination_links_class'>" . implode( "\n", $page_links ) . '</span>';

    if ( $total_pages ) {
      $page_class = $total_pages < 2 ? ' one-page' : '';
    } else {
      $page_class = ' no-pages';
    }
    $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";

    echo $this->_pagination;
  }
 

 View on GitHub View on Trac