Actions.php
8 years ago
Description.php
8 years ago
ID.php
8 years ago
Image.php
8 years ago
Length.php
8 years ago
Notes.php
8 years ago
Owner.php
8 years ago
Rss.php
8 years ago
Target.php
8 years ago
Owner.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | /** |
| 8 | * @since 2.0 |
| 9 | */ |
| 10 | class AC_Column_Link_Owner extends AC_Column { |
| 11 | |
| 12 | public function __construct() { |
| 13 | $this->set_type( 'column-owner' ); |
| 14 | $this->set_label( __( 'Owner', 'codepress-admin-columns' ) ); |
| 15 | } |
| 16 | |
| 17 | public function get_value( $id ) { |
| 18 | $bookmark = get_bookmark( $id ); |
| 19 | |
| 20 | $value = $bookmark->link_owner; |
| 21 | |
| 22 | // add user link |
| 23 | $userdata = get_userdata( $bookmark->link_owner ); |
| 24 | |
| 25 | if ( ! empty( $userdata->data ) ) { |
| 26 | $value = $userdata->data->user_nicename; |
| 27 | } |
| 28 | |
| 29 | return $value; |
| 30 | } |
| 31 | |
| 32 | } |
| 33 |