CommentCount.php
4 years ago
Description.php
4 years ago
DisplayName.php
4 years ago
Email.php
4 years ago
FirstName.php
4 years ago
FirstPost.php
4 years ago
FullName.php
4 years ago
ID.php
4 years ago
LastName.php
4 years ago
LastPost.php
4 years ago
Login.php
4 years ago
Name.php
4 years ago
Nicename.php
4 years ago
Nickname.php
4 years ago
PostCount.php
4 years ago
Posts.php
4 years ago
Registered.php
4 years ago
RichEditing.php
4 years ago
Role.php
4 years ago
ShowToolbar.php
4 years ago
Url.php
4 years ago
Username.php
4 years ago
RichEditing.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Column\User; |
| 4 | |
| 5 | use AC\Column; |
| 6 | |
| 7 | class RichEditing extends Column { |
| 8 | |
| 9 | public function __construct() { |
| 10 | $this->set_type( 'column-rich_editing' ) |
| 11 | ->set_label( __( 'Visual Editor', 'codepress-admin-columns' ) ); |
| 12 | } |
| 13 | |
| 14 | public function get_value( $user_id ) { |
| 15 | return ac_helper()->icon->yes_or_no( $this->has_rich_editing( $user_id ) ); |
| 16 | } |
| 17 | |
| 18 | public function get_raw_value( $user_id ) { |
| 19 | return $this->has_rich_editing( $user_id ); |
| 20 | } |
| 21 | |
| 22 | private function has_rich_editing( $user_id ) { |
| 23 | return 'true' == get_userdata( $user_id )->rich_editing; |
| 24 | } |
| 25 | |
| 26 | } |