comment
10 years ago
link
10 years ago
media
10 years ago
post
10 years ago
user
10 years ago
acf-placeholder.php
10 years ago
actions.php
10 years ago
custom-field.php
10 years ago
default.php
10 years ago
taxonomy.php
10 years ago
used-by-menu.php
10 years ago
default.php
37 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Column class for default columns (i.e. columns not added by Admin Columns). |
| 4 | * Allows additional properties, such as editability and filterability, to be |
| 5 | * added to defeault column types. |
| 6 | * |
| 7 | * @since 2.2.1 |
| 8 | */ |
| 9 | class CPAC_Column_Default extends CPAC_Column { |
| 10 | |
| 11 | /** |
| 12 | * @see CPAC_Column::init() |
| 13 | * @since 2.2.1 |
| 14 | */ |
| 15 | public function init() { |
| 16 | |
| 17 | parent::init(); |
| 18 | |
| 19 | // Properties |
| 20 | $this->properties['type'] = 'column-default'; |
| 21 | $this->properties['handle'] = NULL; |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * @since 2.2.1 |
| 26 | * @see CPAC_Column::get_value() |
| 27 | */ |
| 28 | public function get_value( $post_id ) { |
| 29 | |
| 30 | if ( ! empty( $this->properties->handle ) ) { |
| 31 | return $this->storage_model->get_original_column_value( $this->properties->handle, $post_id ); |
| 32 | } |
| 33 | |
| 34 | return ''; |
| 35 | } |
| 36 | |
| 37 | } |