| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Defines the Page Redirects list-table columns and header metadata. |
| 9 |
*/ |
| 10 |
class ABJ_404_Solution_RedirectsTableColumns { |
| 11 |
|
| 12 |
/** |
| 13 |
* @param array<string, mixed> $tableOptions |
| 14 |
* @return array<string, array<string, string>> |
| 15 |
*/ |
| 16 |
public function build(array $tableOptions): array { |
| 17 |
return array( |
| 18 |
'url' => array( |
| 19 |
'title' => __('URL', '404-solution'), |
| 20 |
'orderby' => 'url', |
| 21 |
'width' => '27%', |
| 22 |
), |
| 23 |
'status' => array( |
| 24 |
'title' => __('Status', '404-solution'), |
| 25 |
'orderby' => 'status', |
| 26 |
'width' => '5%', |
| 27 |
), |
| 28 |
'type' => array( |
| 29 |
'title' => __('Type', '404-solution'), |
| 30 |
'orderby' => 'type', |
| 31 |
'width' => '10%', |
| 32 |
), |
| 33 |
'dest' => array( |
| 34 |
'title' => __('Destination', '404-solution'), |
| 35 |
'orderby' => 'final_dest', |
| 36 |
'width' => '22%', |
| 37 |
), |
| 38 |
'code' => array( |
| 39 |
'title' => __('Redirect', '404-solution'), |
| 40 |
'orderby' => 'code', |
| 41 |
'width' => '5%', |
| 42 |
), |
| 43 |
'confidence' => array( |
| 44 |
'title' => __('Confidence', '404-solution'), |
| 45 |
'orderby' => 'score', |
| 46 |
'width' => '7%', |
| 47 |
'class' => 'hide-on-tablet', |
| 48 |
), |
| 49 |
'hits' => array( |
| 50 |
'title' => __('Hits', '404-solution'), |
| 51 |
'orderby' => 'logshits', |
| 52 |
'width' => '5%', |
| 53 |
), |
| 54 |
'timestamp' => array( |
| 55 |
'title' => __('Created', '404-solution'), |
| 56 |
'orderby' => 'timestamp', |
| 57 |
'width' => '10%', |
| 58 |
'class' => 'hide-on-tablet', |
| 59 |
), |
| 60 |
'last_used' => array( |
| 61 |
'title' => __('Last Used', '404-solution'), |
| 62 |
'orderby' => 'last_used', |
| 63 |
'width' => '10%', |
| 64 |
), |
| 65 |
); |
| 66 |
} |
| 67 |
} |
| 68 |
|