PluginProbe
404 Solution / trunk
404 Solution vtrunk
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / admin / RedirectsTableColumns.php

RedirectsTableColumns.php in 404 Solution trunk, at includes/admin/RedirectsTableColumns.php

72 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 ABJ_404_Solution_TableRenderTranslationTracer::traceScope(
18 'redirect_header',
19 'URL|Status|Type|Destination|Redirect|Confidence|Hits|Created|Last Used',
20 static fn(): array => array(
21 'url' => array(
22 'title' => __('URL', '404-solution'),
23 'orderby' => 'url',
24 'width' => '27%',
25 ),
26 'status' => array(
27 'title' => __('Status', '404-solution'),
28 'orderby' => 'status',
29 'width' => '5%',
30 ),
31 'type' => array(
32 'title' => __('Type', '404-solution'),
33 'orderby' => 'type',
34 'width' => '10%',
35 ),
36 'dest' => array(
37 'title' => __('Destination', '404-solution'),
38 'orderby' => 'final_dest',
39 'width' => '22%',
40 ),
41 'code' => array(
42 'title' => __('Redirect', '404-solution'),
43 'orderby' => 'code',
44 'width' => '5%',
45 ),
46 'confidence' => array(
47 'title' => __('Confidence', '404-solution'),
48 'orderby' => 'score',
49 'width' => '7%',
50 'class' => 'hide-on-tablet',
51 ),
52 'hits' => array(
53 'title' => __('Hits', '404-solution'),
54 'orderby' => 'logshits',
55 'width' => '5%',
56 ),
57 'timestamp' => array(
58 'title' => __('Created', '404-solution'),
59 'orderby' => 'timestamp',
60 'width' => '10%',
61 'class' => 'hide-on-tablet',
62 ),
63 'last_used' => array(
64 'title' => __('Last Used', '404-solution'),
65 'orderby' => 'last_used',
66 'width' => '10%',
67 ),
68 )
69 );
70 }
71 }
72