PluginProbe
Stream – Activity Log & Audit Trail / 3.2.0
Stream – Activity Log & Audit Trail v3.2.0
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
stream / classes / class-preview-list-table.php

class-preview-list-table.php in Stream – Activity Log & Audit Trail 3.2.0, at classes/class-preview-list-table.php

63 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace WP_Stream;
3
4 class Preview_List_Table extends List_Table {
5
6 /**
7 * Class constructor.
8 *
9 * @param Plugin $plugin Plugin object.
10 * @return void
11 */
12 public function __construct( $plugin ) {
13 $this->plugin = $plugin;
14 parent::__construct( $plugin );
15 }
16
17 /**
18 * Sets up the records for display.
19 *
20 * @param array $items List of items for display.
21 * @return void
22 */
23 function set_records( $items ) {
24 $columns = $this->get_columns();
25 $sortable = $this->get_sortable_columns();
26 $hidden = $this->get_hidden_columns();
27 $primary = $columns['summary'];
28
29 $this->_column_headers = array( $columns, $hidden, $sortable, $primary );
30
31 $this->items = $items;
32 }
33
34 /**
35 * Display the table
36 *
37 * @since 3.1.0
38 * @access public
39 */
40 public function display() {
41 ?>
42 <table class="wp-list-table <?php esc_attr( implode( ' ', $this->get_table_classes() ) ); ?>">
43 <thead>
44 <tr>
45 <?php $this->print_column_headers(); ?>
46 </tr>
47 </thead>
48
49 <tbody id="the-list">
50 <?php $this->display_rows_or_placeholder(); ?>
51 </tbody>
52
53 <tfoot>
54 <tr>
55 <?php $this->print_column_headers( false ); ?>
56 </tr>
57 </tfoot>
58
59 </table>
60 <?php
61 }
62 }
63