Column.php
3 years ago
Table.php
3 years ago
Table_Campaigns.php
3 years ago
Table_Geo.php
3 years ago
Table_Pages.php
3 years ago
Table_Referrers.php
3 years ago
Table_Pages.php
16 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\IAWP\Tables; |
| 4 | |
| 5 | class Table_Pages extends Table |
| 6 | { |
| 7 | protected function local_columns() : array |
| 8 | { |
| 9 | return [new Column(['id' => 'title', 'label' => \esc_html__('Title', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'visitors', 'label' => \esc_html__('Visitors', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'views', 'label' => \esc_html__('Views', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'sessions', 'label' => \esc_html__('Sessions', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'average_view_duration', 'label' => \esc_html__('View Duration', 'iawp'), 'visible' => \true, 'sort_direction' => 'desc']), new Column(['id' => 'visitors_growth', 'label' => \esc_html__('Visitors Growth', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'exportable' => \false]), new Column(['id' => 'views_growth', 'label' => \esc_html__('Views Growth', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc', 'exportable' => \false]), new Column(['id' => 'url', 'label' => \esc_html__('URL', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'author', 'label' => \esc_html__('Author', 'iawp'), 'visible' => \false, 'sort_direction' => 'asc']), new Column(['id' => 'type', 'label' => \esc_html__('Page Type', 'iawp'), 'visible' => \true, 'sort_direction' => 'asc']), new Column(['id' => 'date', 'label' => \esc_html__('Publish Date', 'iawp'), 'visible' => \false, 'sort_direction' => 'asc']), new Column(['id' => 'category', 'label' => \esc_html__('Post Category', 'iawp'), 'visible' => \false, 'sort_direction' => 'asc']), new Column(['id' => 'comments', 'label' => \esc_html__('Comments', 'iawp'), 'visible' => \false, 'sort_direction' => 'desc'])]; |
| 10 | } |
| 11 | protected function table_name() : string |
| 12 | { |
| 13 | return 'views'; |
| 14 | } |
| 15 | } |
| 16 |