ScreenTools.php
526 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
<?php
namespace AC\Table;
use AC;
use AC\Registerable;
final class ScreenTools implements Registerable {
public function register() {
add_action( 'ac/table', function ( Screen $screen ) {
$list_screen = $screen->get_list_screen();
if ( ! $list_screen->has_id() ) {
return;
}
add_filter( 'screen_settings', [ $this, 'render' ] );
} );
}
public function render( $html ) {
ob_start();
?>
<div id="acp-screen-option-tools">
</div>
<?php
$html .= ob_get_clean();
return $html;
}
}