source/php/Module/Posts/Posts.php
public function getColumns($posts)
    {
        $columns = array();

        if (is_array($posts)) {
            foreach ($posts as $post) {
                $values = get_field('posts_list_column_titles', $post);

                if (is_array($values)) {
                    foreach ($values as $value) {
                        $columns[] = $value['column_header'];
                    }
                }
            }
        }

        return $columns;
    }
public function getColumns($posts)
    {
        $columns = array();

        if (is_array($posts)) {
            foreach ($posts as $post) {
                $values = get_field('posts_list_column_titles', $post);

                if (is_array($values)) {
                    foreach ($values as $value) {
                        $columns[] = $value['column_header'];
                    }
                }
            }
        }

        return $columns;
    }
public function getColumns ( $ posts ) { $ columns = array ( ) ; if ( is_array ( $ posts ) ) { foreach ( $ posts as $ post ) { $ values = get_field ( 'posts_list_column_titles' , $ post ) ; if ( is_array ( $ values ) ) { foreach ( $ values as $ value ) { $ columns [ ] = $ value [ 'column_header' ] ; } } } } return $ columns ; }
Get field columns
@param  array $posts Post ids
@return array        Column names
Get field columns