Actions.php
689 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
<?php
namespace AC\Column;
use AC\Column;
use AC\Settings;
/**
* Base class for columns containing action links for items.
* @since 2.2.6
*/
class Actions extends Column {
/**
* @since 2.2.6
*/
public function __construct() {
$this->set_type( 'column-actions' );
$this->set_label( __( 'Actions', 'codepress-admin-columns' ) );
}
/**
* @param $id
*
* @return string
* @since 2.2.6
*/
public function get_value( $id ) {
if ( $this->get_setting( 'use_icons' )->get_value() ) {
return '<span class="cpac_use_icons"></span>';
}
return '';
}
public function register_settings() {
$this->add_setting( new Settings\Column\ActionIcons( $this ) );
}
}