ID.php
10 years ago
actions.php
10 years ago
description.php
10 years ago
image.php
10 years ago
length.php
10 years ago
notes.php
10 years ago
owner.php
10 years ago
rss.php
10 years ago
target.php
10 years ago
notes.php
44 lines
| 1 | <?php |
| 2 | /** |
| 3 | * CPAC_Column_Link_Notes |
| 4 | * |
| 5 | * @since 2.0 |
| 6 | */ |
| 7 | class CPAC_Column_Link_Notes extends CPAC_Column { |
| 8 | |
| 9 | /** |
| 10 | * @see CPAC_Column::init() |
| 11 | * @since 2.2.1 |
| 12 | */ |
| 13 | public function init() { |
| 14 | |
| 15 | parent::init(); |
| 16 | |
| 17 | // Properties |
| 18 | $this->properties['type'] = 'column-notes'; |
| 19 | $this->properties['label'] = __( 'Notes', 'codepress-admin-columns' ); |
| 20 | |
| 21 | // Options |
| 22 | $this->options['excerpt_length'] = 30; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * @see CPAC_Column::get_value() |
| 27 | * @since 2.0 |
| 28 | */ |
| 29 | function get_value( $id ) { |
| 30 | |
| 31 | $bookmark = get_bookmark( $id ); |
| 32 | |
| 33 | return $this->get_shortened_string( $bookmark->link_notes, $this->options->excerpt_length ); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * @see CPAC_Column::display_settings() |
| 38 | * @since 2.0 |
| 39 | */ |
| 40 | function display_settings() { |
| 41 | |
| 42 | $this->display_field_excerpt_length(); |
| 43 | } |
| 44 | } |