CommentCount.php
8 years ago
Description.php
8 years ago
DisplayName.php
8 years ago
Email.php
8 years ago
FirstName.php
8 years ago
ID.php
8 years ago
LastName.php
8 years ago
Name.php
8 years ago
Nickname.php
8 years ago
PostCount.php
8 years ago
Posts.php
8 years ago
Registered.php
8 years ago
RichEditing.php
8 years ago
Role.php
8 years ago
ShowToolbar.php
8 years ago
Url.php
8 years ago
Username.php
8 years ago
RichEditing.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | class AC_Column_User_RichEditing extends AC_Column { |
| 8 | |
| 9 | public function __construct() { |
| 10 | $this->set_type( 'column-rich_editing' ); |
| 11 | $this->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 | $userdata = get_userdata( $user_id ); |
| 24 | |
| 25 | return $userdata->rich_editing == 'true' ? true : false; |
| 26 | } |
| 27 | |
| 28 | } |
| 29 |