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
image.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * CPAC_Column_Link_Image |
| 4 | * |
| 5 | * @since 2.0 |
| 6 | */ |
| 7 | class CPAC_Column_Link_Image 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-image'; |
| 19 | $this->properties['label'] = __( 'Image', 'codepress-admin-columns' ); |
| 20 | |
| 21 | // Options |
| 22 | $this->options['image_size'] = ''; |
| 23 | $this->options['image_size_w'] = 80; |
| 24 | $this->options['image_size_h'] = 80; |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * @see CPAC_Column::get_value() |
| 29 | * @since 2.0 |
| 30 | */ |
| 31 | function get_value( $id ) { |
| 32 | |
| 33 | $bookmark = get_bookmark( $id ); |
| 34 | |
| 35 | return implode( $this->get_thumbnails( $bookmark->link_image ) ); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * @see CPAC_Column::display_settings() |
| 40 | * @since 2.0 |
| 41 | */ |
| 42 | function display_settings() { |
| 43 | |
| 44 | $this->display_field_preview_size(); |
| 45 | } |
| 46 | } |