Theater for WordPress Code Reference
  • Package
  • Class

Packages

  • Theater
    • Abstracts
    • Events

Classes

  • Theater_Item
  • Theater_List

Class Theater_Item

Abstract Theater Item class.

Direct known subclasses

Theater_Event, Theater_Event_Date

Abstract
Package: Theater\Abstracts
Since: 0.16
Located at functions/abstract/class-theater-item.php

Methods summary

public
# __construct( integer|WP_Post $ID = false, $template = '' )

Sets the ID and template of this item.

Sets the ID and template of this item.

Parameters

$ID
ID of post object or post object of this item.
$template

Since

0.16

Uses

Theater_Item::$ID
to set the ID of this item.
Theater_Item::$template to set the template for the HTML output of this item.
protected string
# apply_template_filters( string $value, WPT_Template_Placeholder_Filter[] $filters )

Applies template filters to a field value string.

Applies template filters to a field value string.

Parameters

$value
The value.
$filters
The template filters.

Returns

string
The filtered value.

Since

0.16
public mixed
# get_field( string $name )

Gets the value for a field.

Gets the value for a field.

Parameters

$name
The field name.

Returns

mixed

Since

0.16

Uses

Theater_Event_Field::get()
to get the value of a field.
public string
# get_field_html( string $name, array $filters = array() )

Gets the HTML output for a field.

Gets the HTML output for a field.

Parameters

$name
The field name.
$filters
(default: array())

Returns

string
The HTML output for a field.

Since

0.16

Uses

Theater_Event_Field::get_html()
to get the HTML of a field value.
abstract public array
# get_fields( )

Gets a list of of available fields for this item.

Gets a list of of available fields for this item.

Returns

array

Since

0.16

Used by

Theater_Item::has_field()
to get all fields of an item.
abstract public string
# get_html( )

Gets the HTML output of this item.

Gets the HTML output of this item.

Returns

string
The HTML output of this item.

Since

0.16
public string
# get_name( )

Gets the name of this item.

Gets the name of this item.

Returns

string

Since

0.16

Uses

Theater_Item::$name to get the name of this item.
public string
# get_post_type( )

Get the post type of this item.

Get the post type of this item.

Returns

string

Since

0.16

Uses

Theater_Item::$post_type_name to get the post type of this item.

Used by

Theater_Event_Date::get_html()
to get the post type for an event date.
public boolean
# has_field( string $name )

Checks if this item has a certain field.

Checks if this item has a certain field.

Parameters

$name

Returns

boolean

Since

0.16

Uses

Theater_Item::get_fields()
to get all fields of an item.

Properties summary

public integer $ID

ID of this item.

ID of this item.

Since

0.16

Used by

Theater_Item::__construct()
to set the ID of this item.
#
Theater for WordPress Code Reference API documentation generated by ApiGen