ID.php
10 years ago
actions.php
10 years ago
alternate-text.php
10 years ago
attached-to.php
10 years ago
available-sizes.php
10 years ago
caption.php
10 years ago
description.php
10 years ago
dimensions.php
10 years ago
exif-data.php
10 years ago
file-name.php
10 years ago
file-size.php
10 years ago
full-path.php
10 years ago
height.php
10 years ago
mime-type.php
10 years ago
width.php
10 years ago
height.php
37 lines
| 1 | <?php |
| 2 | /** |
| 3 | * CPAC_Column_Media_Height |
| 4 | * |
| 5 | * @since 2.0 |
| 6 | */ |
| 7 | class CPAC_Column_Media_Height 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-height'; |
| 19 | $this->properties['label'] = __( 'Height', 'codepress-admin-columns' ); |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @see CPAC_Column::get_value() |
| 24 | * @since 2.0 |
| 25 | */ |
| 26 | function get_value( $id ) { |
| 27 | |
| 28 | $value = ''; |
| 29 | |
| 30 | $meta = get_post_meta( $id, '_wp_attachment_metadata', true ); |
| 31 | |
| 32 | if( ! empty( $meta['height'] ) ) |
| 33 | $value = $meta['height']; |
| 34 | |
| 35 | return $value; |
| 36 | } |
| 37 | } |