Posts_Table
Represents a data table of WP_Post objects.
This class is responsible for creating the table from the supplied args and returning it as a Html_Data_Table object.
Tags
Table of Contents
- CONTROL_COLUMN_DATA_SOURCE = 'control'
 - $args : mixed
 - $data_table : mixed
 - $hooks : mixed
 - $id : mixed
 - $query : mixed
 - $cache : mixed
 - $columns : mixed
 - $config_builder : mixed
 - $data_added : mixed
 - $data_factory : mixed
 - $table_initialised : mixed
 - __construct() : mixed
 - get_data() : object|array<string|int, mixed>|string
 - Retrieves the data table containing the list of posts based on the specified arguments.
 - get_table() : object|array<string|int, mixed>|string
 - Retrieves the data table containing the list of posts based on the arguments supplied on construction.
 - update() : mixed
 - add_attributes() : mixed
 - add_heading() : mixed
 - add_headings() : mixed
 - add_post_data() : mixed
 - add_posts_to_table() : mixed
 - array_filter_empty_attribute() : mixed
 - can_fetch_data() : mixed
 - fetch_data() : mixed
 - get_row_attributes() : mixed
 - json_encode_config() : mixed
 
Constants
CONTROL_COLUMN_DATA_SOURCE
    public
    mixed
    CONTROL_COLUMN_DATA_SOURCE
    = 'control'
    
        
    
    Tags
Properties
$args
    public
        mixed
    $args
    
    
        
    
    Tags
$data_table
    public
        mixed
    $data_table
    
    
        
    
    Tags
$hooks
    public
        mixed
    $hooks
    
    
        
    
    Tags
$id
    public
        mixed
    $id
    
    
        
    
    Tags
$query
    public
        mixed
    $query
    
    
        
    
    Tags
$cache
    private
        mixed
    $cache
    
    
        
    
    Tags
$columns
    private
        mixed
    $columns
    
    
        
    
    Tags
$config_builder
    private
        mixed
    $config_builder
    
    
        
    
    Tags
$data_added
    private
        mixed
    $data_added
     = false
    
        
    
    Tags
$data_factory
    private
        mixed
    $data_factory
    
    
        
    
    Tags
$table_initialised
    private
        mixed
    $table_initialised
     = false
    
        
    
    Tags
Methods
__construct()
    public
                __construct(mixed $id[, mixed $args = [] ]) : mixed
    
        Parameters
- $id : mixed
 - $args : mixed = []
 
Tags
Return values
mixed —get_data()
Retrieves the data table containing the list of posts based on the specified arguments.
    public
                get_data([mixed $output = 'object' ]) : object|array<string|int, mixed>|string
        The table returned includes only the table data itself (i.e. the rows), and doesn't include the header, footer, etc.
If the output is 'object' the returned object will be an Html_Data_Table instance. If the output is 'html', the data returned will be a string containing a list of
Parameters
- $output : mixed = 'object'
 
Tags
Return values
object|array<string|int, mixed>|string —The posts table data in the requested format.
get_table()
Retrieves the data table containing the list of posts based on the arguments supplied on construction.
    public
                get_table([string $output = 'object' ]) : object|array<string|int, mixed>|string
        The table returned includes the table headings, attributes and data.
If the output is 'object' the returned object is an Html_Data_Table instance. If the output is 'html', the table returned will be a string containing the