ID.php
12 years ago
actions.php
12 years ago
attachment-count.php
12 years ago
attachment.php
12 years ago
author-name.php
12 years ago
before-moretag.php
12 years ago
comment-count.php
12 years ago
comment-status.php
12 years ago
excerpt.php
12 years ago
featured-image.php
12 years ago
formats.php
12 years ago
modified.php
12 years ago
order.php
12 years ago
page-template.php
12 years ago
parent.php
12 years ago
ping-status.php
12 years ago
roles.php
12 years ago
slug.php
12 years ago
status.php
12 years ago
sticky.php
12 years ago
taxonomy.php
12 years ago
word-count.php
12 years ago
excerpt.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * CPAC_Column_Post_Excerpt |
| 4 | * |
| 5 | * @since 2.0.0 |
| 6 | */ |
| 7 | class CPAC_Column_Post_Excerpt extends CPAC_Column { |
| 8 | |
| 9 | function __construct( $storage_model ) { |
| 10 | |
| 11 | // define properties |
| 12 | $this->properties['type'] = 'column-excerpt'; |
| 13 | $this->properties['label'] = __( 'Excerpt', '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( $post_id ) { |
| 26 | |
| 27 | return $this->get_post_excerpt( $post_id, $this->options->excerpt_length ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @see CPAC_Column::display_settings() |
| 32 | * @since 2.0.0 |
| 33 | */ |
| 34 | function display_settings() { |
| 35 | |
| 36 | $this->display_field_excerpt_length(); |
| 37 | } |
| 38 | } |