src/class-extended-cpt-admin.php
public function col_post_field( string $field, array $args ) {

		global $post;

		switch ( $field ) {

			case 'post_date':
			case 'post_date_gmt':
			case 'post_modified':
			case 'post_modified_gmt':
				if ( '0000-00-00 00:00:00' !== get_post_field( $field, $post ) ) {
					if ( ! isset( $args['date_format'] ) ) {
						$args['date_format'] = get_option( 'date_format' );
					}
					echo esc_html( mysql2date( $args['date_format'], get_post_field( $field, $post ) ) );
				}
				break;

			case 'post_status':
				$status = get_post_status_object( get_post_status( $post ) );
				if ( $status ) {
					echo esc_html( $status->label );
				}
				break;

			case 'post_author':
				echo esc_html( get_the_author() );
				break;

			case 'post_title':
				echo esc_html( get_the_title() );
				break;

			case 'post_excerpt':
				echo esc_html( get_the_excerpt() );
				break;

			default:
				echo esc_html( get_post_field( $field, $post ) );
				break;

		}

	}
public function col_post_field( string $field, array $args ) {

		global $post;

		switch ( $field ) {

			case 'post_date':
			case 'post_date_gmt':
			case 'post_modified':
			case 'post_modified_gmt':
				if ( '0000-00-00 00:00:00' !== get_post_field( $field, $post ) ) {
					if ( ! isset( $args['date_format'] ) ) {
						$args['date_format'] = get_option( 'date_format' );
					}
					echo esc_html( mysql2date( $args['date_format'], get_post_field( $field, $post ) ) );
				}
				break;

			case 'post_status':
				$status = get_post_status_object( get_post_status( $post ) );
				if ( $status ) {
					echo esc_html( $status->label );
				}
				break;

			case 'post_author':
				echo esc_html( get_the_author() );
				break;

			case 'post_title':
				echo esc_html( get_the_title() );
				break;

			case 'post_excerpt':
				echo esc_html( get_the_excerpt() );
				break;

			default:
				echo esc_html( get_post_field( $field, $post ) );
				break;

		}

	}
public function col_post_field ( string $ field , array $ args ) { global $ post ; switch ( $ field ) { case 'post_date' : case 'post_date_gmt' : case 'post_modified' : case 'post_modified_gmt' : if ( '0000-00-00 00:00:00' !== get_post_field ( $ field , $ post ) ) { if ( ! isset ( $ args [ 'date_format' ] ) ) { $ args [ 'date_format' ] = get_option ( 'date_format' ) ; } echo esc_html ( mysql2date ( $ args [ 'date_format' ] , get_post_field ( $ field , $ post ) ) ) ; } break ; case 'post_status' : $ status = get_post_status_object ( get_post_status ( $ post ) ) ; if ( $ status ) { echo esc_html ( $ status -> label ) ; } break ; case 'post_author' : echo esc_html ( get_the_author ( ) ) ; break ; case 'post_title' : echo esc_html ( get_the_title ( ) ) ; break ; case 'post_excerpt' : echo esc_html ( get_the_excerpt ( ) ) ; break ; default : echo esc_html ( get_post_field ( $ field , $ post ) ) ; break ; } }
Output column data for a post field.

@param string $field The post field
@param array  $args  Array of arguments for this field
Output column data for a post field .