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