lib/Post_Type_Columns.php
public function column_content( $column_name, $post_id ) {
		// Bail out.
		if ( empty( $this->columns )
			|| ! in_array( $column_name, array_keys( $this->columns ), true )
		) {
			return;
		}

		$column = $this->columns[ $column_name ];

		if ( 'thumbnail' === $column_name ) {
			$src = get_the_post_thumbnail_url( $post_id, 'thumbnail' );

			if ( empty( $src ) ) {
				return;
			}

			$styles = '';

			foreach ( [ 'width', 'height' ] as $attr ) {
				if ( isset( $column[ $attr ] ) ) {
					$styles .= $attr . ':' . $column[ $attr ] . 'px;';
				}
			}

			if ( ! empty( $styles ) ) {
				$styles = ' style="' . $styles . '"';
			}

			echo '<img src="' . esc_attr( $src ) . '"' . $styles . '>';

			return;
		}

		if ( 'acf' === $column['type'] ) {
			$value = get_field( $column_name, $post_id );
		} else {
			$value = get_post_meta( $post_id, $column_name, true );
		}

		if ( is_callable( $column['transform'] ) ) {
			$value = call_user_func( $column['transform'], $value, $post_id );
		}

		echo $value;
	}
public function column_content( $column_name, $post_id ) {
		// Bail out.
		if ( empty( $this->columns )
			|| ! in_array( $column_name, array_keys( $this->columns ), true )
		) {
			return;
		}

		$column = $this->columns[ $column_name ];

		if ( 'thumbnail' === $column_name ) {
			$src = get_the_post_thumbnail_url( $post_id, 'thumbnail' );

			if ( empty( $src ) ) {
				return;
			}

			$styles = '';

			foreach ( [ 'width', 'height' ] as $attr ) {
				if ( isset( $column[ $attr ] ) ) {
					$styles .= $attr . ':' . $column[ $attr ] . 'px;';
				}
			}

			if ( ! empty( $styles ) ) {
				$styles = ' style="' . $styles . '"';
			}

			echo '<img src="' . esc_attr( $src ) . '"' . $styles . '>';

			return;
		}

		if ( 'acf' === $column['type'] ) {
			$value = get_field( $column_name, $post_id );
		} else {
			$value = get_post_meta( $post_id, $column_name, true );
		}

		if ( is_callable( $column['transform'] ) ) {
			$value = call_user_func( $column['transform'], $value, $post_id );
		}

		echo $value;
	}
public function column_content ( $ column_name , $ post_id ) { // Bail out. if ( empty ( $ this -> columns ) || ! in_array ( $ column_name , array_keys ( $ this -> columns ) , true ) ) { return ; } $ column = $ this -> columns [ $ column_name ] ; if ( 'thumbnail' === $ column_name ) { $ src = get_the_post_thumbnail_url ( $ post_id , 'thumbnail' ) ; if ( empty ( $ src ) ) { return ; } $ styles = '' ; foreach ( [ 'width' , 'height' ] as $ attr ) { if ( isset ( $ column [ $ attr ] ) ) { $ styles .= $ attr . ':' . $ column [ $ attr ] . 'px;' ; } } if ( ! empty ( $ styles ) ) { $ styles = ' style="' . $ styles . '"' ; } echo '<img src="' . esc_attr ( $ src ) . '"' . $ styles . '>' ; return ; } if ( 'acf' === $ column [ 'type' ] ) { $ value = get_field ( $ column_name , $ post_id ) ; } else { $ value = get_post_meta ( $ post_id , $ column_name , true ) ; } if ( is_callable ( $ column [ 'transform' ] ) ) { $ value = call_user_func ( $ column [ 'transform' ] , $ value , $ post_id ) ; } echo $ value ; }
Update column contents for post list view.

@param string $column_name The column slug.
@param int    $post_id     The post ID.
Update column contents for post list view .