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
ping-status.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * CPAC_Column_Post_Ping_Status |
| 5 | * |
| 6 | * @since 2.0.0 |
| 7 | */ |
| 8 | class CPAC_Column_Post_Ping_Status extends CPAC_Column { |
| 9 | |
| 10 | function __construct( $storage_model ) { |
| 11 | |
| 12 | // define properties |
| 13 | $this->properties['type'] = 'column-ping_status'; |
| 14 | $this->properties['label'] = __( 'Ping status', 'cpac' ); |
| 15 | |
| 16 | parent::__construct( $storage_model ); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @see CPAC_Column::get_value() |
| 21 | * @since 2.0.0 |
| 22 | */ |
| 23 | function get_value( $post_id ) { |
| 24 | |
| 25 | $p = get_post( $post_id ); |
| 26 | |
| 27 | $value = $this->get_asset_image( 'no.png', $p->ping_status ); |
| 28 | |
| 29 | if ( 'open' == $p->ping_status ) |
| 30 | $value = $this->get_asset_image( 'checkmark.png', $p->ping_status ); |
| 31 | |
| 32 | return $value; |
| 33 | } |
| 34 | } |