Post_Custom_Field extends Abstract_Table_Data
Gets the post data for a custom field column.
Tags
Table of Contents
- $links : mixed
- $post : mixed
- $acf_field_object : mixed
- $date_columns : mixed
- $date_format : mixed
- $field : mixed
- $image_size : mixed
- $is_acf_field : mixed
- __construct() : mixed
- get_data() : mixed
- get_filter_data() : mixed
- get_sort_data() : mixed
- get_separator() : string
- Get the category, tag, term or custom field separator for displaying a list of items in the table.
- get_terms_for_column() : string
- Get a list of terms for the specified column, returned as an HTML list.
- convert_to_timestamp() : mixed
- flatten_custom_field() : mixed
- get_acf_value() : mixed
- get_post_title() : mixed
- is_acf_date_field() : mixed
- is_date_field() : mixed
Properties
$links
protected
mixed
$links
Tags
$post
protected
mixed
$post
Tags
$acf_field_object
private
mixed
$acf_field_object
Tags
$date_columns
private
mixed
$date_columns
Tags
$date_format
private
mixed
$date_format
Tags
$field
private
mixed
$field
Tags
$image_size
private
mixed
$image_size
Tags
$is_acf_field
private
mixed
$is_acf_field
Tags
Methods
__construct()
public
__construct(mixed $post, mixed $field[, mixed $links = '' ][, mixed $image_size = '' ][, mixed $date_format = '' ][, mixed $date_columns = [] ]) : mixed
Parameters
- $post : mixed
- $field : mixed
- $links : mixed = ''
- $image_size : mixed = ''
- $date_format : mixed = ''
- $date_columns : mixed = []
Tags
Return values
mixed —get_data()
public
get_data() : mixed
Tags
Return values
mixed —get_filter_data()
public
get_filter_data() : mixed
Tags
Return values
mixed —get_sort_data()
public
get_sort_data() : mixed
Tags
Return values
mixed —get_separator()
Get the category, tag, term or custom field separator for displaying a list of items in the table.
protected
static get_separator(string $item_type) : string
Parameters
- $item_type : string
-
The type of item.
Tags
Return values
string —The separator.
get_terms_for_column()
Get a list of terms for the specified column, returned as an HTML list.
protected
get_terms_for_column(string $column[, bool $show_links = false ][, string $sep = ', ' ]) : string
Parameters
- $column : string
-
The column the retrieve terms for (categories, tags, tax:region, etc).
- $show_links : bool = false
-
Whether to include links to the term archive page. Default: false.
- $sep : string = ', '
-
The term separator, Default: ', '
Tags
Return values
string —HTML string of the list of terms.
convert_to_timestamp()
private
convert_to_timestamp(mixed $date) : mixed
Parameters
- $date : mixed
Tags
Return values
mixed —flatten_custom_field()
private
flatten_custom_field(mixed $carry, mixed $item) : mixed
Parameters
- $carry : mixed
- $item : mixed
Tags
Return values
mixed —get_acf_value()
private
get_acf_value(mixed $field_obj[, mixed $post_id = false ]) : mixed
Parameters
- $field_obj : mixed
- $post_id : mixed = false
Tags
Return values
mixed —get_post_title()
private
get_post_title(mixed $post_id) : mixed
Parameters
- $post_id : mixed
Tags
Return values
mixed —is_acf_date_field()
private
is_acf_date_field() : mixed
Tags
Return values
mixed —is_date_field()
private
is_date_field() : mixed