/**
     * Hooks into list table cell.
     *
     * Executed on all, so need to only apply to messages.
     *
     * @since 0.1
     */
    function wp_list_table_cell($cell_data)
    {
        global $wp_crm, $wpdb;
        if ($cell_data['table_scope'] != 'wp_crm_contact_messages') {
            return $cell_data;
        }
        $object = $cell_data['object'];
        $user_id = $object['user_id'];
        if ($associated_object = $object['associated_object']) {
            $associated_object = get_post($associated_object);
            //** Only allow specific post types to be "associated "*/
            if (apply_filters('wp_crm_associated_post_types', false, $associated_object->post_type)) {
                $post_type = get_post_type_object($associated_object->post_type);
            } else {
                unset($associated_object);
            }
        }
        switch ($cell_data['column_name']) {
            case 'user_card':
                $r .= WP_CRM_F::render_user_card(array('user_id' => $user_id));
                break;
            case 'messages':
                $total_messages = $object['total_messages'];
                $additional_messages = $total_messages - 1;
                ob_start();
                ?>

            <ul>
              <li><?php 
                echo CRM_UD_F::parse_urls(nl2br($object['text']), 100, '_blank');
                ?>
</li>

              <?php 
                if ($associated_object) {
                    ?>
              <li><?php 
                    echo sprintf(__('Related %s:', 'wp_crm'), $post_type->labels->singular_name);
                    ?>
 <a href="<?php 
                    echo admin_url("post.php?post={$associated_object->post_ID}&action=edit");
                    ?>
" target="_blank"><?php 
                    echo $associated_object->post_title;
                    ?>
</a></li>
              <?php 
                }
                ?>

              <li><?php 
                echo human_time_diff(strtotime($object['time']));
                ?>
 <?php 
                _e('ago');
                ?>
.
                <?php 
                if ($additional_messages) {
                    echo '<a href="' . admin_url("admin.php?page=wp_crm_add_new&user_id={$user_id}") . '">' . $additional_messages . ' ' . __('other messages.') . '</a>';
                }
                ?>
              </li>
            </ul>

            <?php 
                $row_actions = array('trash_message' => __('Trash'));
                if ($object['status'] != 'archived') {
                    $row_actions['archive_message'] = __('Archive', 'wp_crm');
                }
                //** Only allow Trashing of recently registered users */
                $week_ago = date('Y-m-d', strtotime('-3 days'));
                if ($wpdb->get_var("SELECT ID FROM {$wpdb->users} WHERE ID = {$user_id} AND user_registered  > '{$week_ago}'") && get_user_meta($user_id, 'wpc_cm_generated_account')) {
                    $row_actions['trash_message_and_user'] = __('Trash Message and User', 'wp_crm');
                    $verify_actions['trash_message_and_user'] = true;
                }
                $row_actions = apply_filters('wp_crm_message_quick_actions', $row_actions);
                $verify_actions = apply_filters('wp_crm_message_quick_actions_verification', $verify_actions);
                ?>
            <?php 
                if ($row_actions) {
                    ?>
            <div class="row-actions">
               <?php 
                    foreach ($row_actions as $action => $title) {
                        ?>
                  <span  wp_crm_action="<?php 
                        echo $action;
                        ?>
" <?php 
                        echo $verify_actions[$action] ? 'verify_action="true"' : '';
                        ?>
 object_id="<?php 
                        echo $object['ID'];
                        ?>
" class="<?php 
                        echo $action;
                        ?>
 wp_crm_message_quick_action"><?php 
                        echo $title;
                        ?>
</span>
               <?php 
                    }
                    ?>
              </div>
              <?php 
                }
                ?>


           <?php 
                $content = ob_get_contents();
                ob_end_clean();
                $r .= $content;
                break;
            case 'other_messages':
                break;
        }
        return $r;
    }