| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace WP_Stream; |
| 3 | 4 | |
| 4 | 5 | class Preview_List_Table extends List_Table { |
| 5 | 6 | |
| @@ -6,8 +7,9 @@ | ||
| 6 | 7 | /** |
| 7 | 8 | * Class constructor. |
| 8 | 9 | * |
| 9 | 10 | * @param Plugin $plugin Plugin object. |
| 11 | + * | |
| 10 | 12 | * @return void |
| 11 | 13 | */ |
| 12 | 14 | public function __construct( $plugin ) { |
| 13 | 15 | $this->plugin = $plugin; |
| @@ -17,17 +19,23 @@ | ||
| 17 | 19 | /** |
| 18 | 20 | * Sets up the records for display. |
| 19 | 21 | * |
| 20 | 22 | * @param array $items List of items for display. |
| 23 | + * | |
| 21 | 24 | * @return void |
| 22 | 25 | */ |
| 23 | - function set_records( $items ) { | |
| 24 | - $columns = $this->get_columns(); | |
| 26 | + public function set_records( $items ) { | |
| 27 | + $columns = $this->get_columns(); | |
| 25 | 28 | $sortable = $this->get_sortable_columns(); |
| 26 | 29 | $hidden = $this->get_hidden_columns(); |
| 27 | - $primary = $columns['summary']; | |
| 30 | + $primary = $columns['summary']; | |
| 28 | 31 | |
| 29 | - $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); | |
| 32 | + $this->_column_headers = array( | |
| 33 | + $columns, | |
| 34 | + $hidden, | |
| 35 | + $sortable, | |
| 36 | + $primary, | |
| 37 | + ); | |
| 30 | 38 | |
| 31 | 39 | $this->items = $items; |
| 32 | 40 | } |
| 33 | 41 | |
| @@ -46,9 +54,9 @@ | ||
| 46 | 54 | </tr> |
| 47 | 55 | </thead> |
| 48 | 56 | |
| 49 | 57 | <tbody id="the-list"> |
| 50 | - <?php $this->display_rows_or_placeholder(); ?> | |
| 58 | + <?php $this->display_rows_or_placeholder(); ?> | |
| 51 | 59 | </tbody> |
| 52 | 60 | |
| 53 | 61 | <tfoot> |
| 54 | 62 | <tr> |