Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
admin-columns-pro
/
codepress-admin-columns
/
classes
/
column
/
post
:
formats.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * CPAC_Column_Post_Page_Template * * @since 2.0 */ class CPAC_Column_Post_Formats extends CPAC_Column { /** * @see CPAC_Column::init() * @since 2.2.1 */ public function init() { parent::init(); // Properties $this->properties['type'] = 'column-post_formats'; $this->properties['label'] = __( 'Post Format', 'codepress-admin-columns' ); } /** * @see CPAC_Column::apply_conditional() * @since 2.0 */ function apply_conditional() { if ( post_type_supports( $this->storage_model->key, 'post-formats' ) ) { return true; } return false; } /** * @see CPAC_Column::get_value() * @since 2.0 */ function get_value( $post_id ) { if ( ! ( $format = $this->get_raw_value( $post_id ) ) ) { return false; } return esc_html( get_post_format_string( $format ) ); } /** * @see CPAC_Column::get_raw_value() * @since 2.0.3 */ function get_raw_value( $post_id ) { if ( ! ( $format = get_post_format( $post_id ) ) ) { return false; } return $format; } }