public function listColumnsContent($column, $postId)
    {
        switch ($column) {
            case 'id':
                echo $postId;
                break;
            case 'answer':
                if (get_post_meta($postId, 'customer_feedback_answer', true) == 'no') {
                    echo '<span style="color:#BA3030;">' . __('No') . '</span>';
                } elseif (get_post_meta($postId, 'customer_feedback_answer', true) == 'yes') {
                    echo '<span style="color:#30BA41;">' . __('Yes') . '</span>';
                }
                break;
            case 'topic':
                $topics = wp_get_post_terms($postId, 'feedback_topic');
                if (!empty($topics)) {
                    foreach ($topics as $key => $topic) {
                        echo ($key == 0) ? $topic->name : ', ' . $topic->name;
                    }
                }
                break;
            case 'hasComment':
                echo (!empty(get_field('customer_feedback_comment', $postId))) ? __('Yes') : __('No');
                break;
        }
    }
public function listColumnsContent($column, $postId)
    {
        switch ($column) {
            case 'id':
                echo $postId;
                break;
            case 'answer':
                if (get_post_meta($postId, 'customer_feedback_answer', true) == 'no') {
                    echo '<span style="color:#BA3030;">' . __('No') . '</span>';
                } elseif (get_post_meta($postId, 'customer_feedback_answer', true) == 'yes') {
                    echo '<span style="color:#30BA41;">' . __('Yes') . '</span>';
                }
                break;
            case 'topic':
                $topics = wp_get_post_terms($postId, 'feedback_topic');
                if (!empty($topics)) {
                    foreach ($topics as $key => $topic) {
                        echo ($key == 0) ? $topic->name : ', ' . $topic->name;
                    }
                }
                break;
            case 'hasComment':
                echo (!empty(get_field('customer_feedback_comment', $postId))) ? __('Yes') : __('No');
                break;
        }
    }
public function listColumnsContent ( $ column , $ postId ) { switch ( $ column ) { case 'id' : echo $ postId ; break ; case 'answer' : if ( get_post_meta ( $ postId , 'customer_feedback_answer' , true ) == 'no' ) { echo '<span style="color:#BA3030;">' . __ ( 'No' ) . '</span>' ; } elseif ( get_post_meta ( $ postId , 'customer_feedback_answer' , true ) == 'yes' ) { echo '<span style="color:#30BA41;">' . __ ( 'Yes' ) . '</span>' ; } break ; case 'topic' : $ topics = wp_get_post_terms ( $ postId , 'feedback_topic' ) ; if ( ! empty ( $ topics ) ) { foreach ( $ topics as $ key => $ topic ) { echo ( $ key == 0 ) ? $ topic -> name : ', ' . $ topic -> name ; } } break ; case 'hasComment' : echo ( ! empty ( get_field ( 'customer_feedback_comment' , $ postId ) ) ) ? __ ( 'Yes' ) : __ ( 'No' ) ; break ; } }
Add content to list table columns
@param  string  $column Column slug
@param  integer $postId Post id
@return void
Add content to list table columns