ListScreenWP.php
697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace AC;
use WP_List_Table;
/**
* @since 3.1
*/
abstract class ListScreenWP extends ListScreen {
/**
* @return WP_List_Table
*/
abstract protected function get_list_table();
/**
* @param int $id
*
* @return object
*/
abstract protected function get_object( $id );
/**
* @param int $id
*
* @return string HTML
*/
public function get_single_row( $id ) {
ob_start();
$this->get_list_table()->single_row( $this->get_object( $id ) );
return ob_get_clean();
}
/**
* @return array [ $column_name => [ $orderby, $order ], ... ]
*/
public function get_default_sortable_columns() {
_deprecated_function( __METHOD__, '4.0' );
return [];
}
}