Core Theme Components

CorePost extends Post

Provides common methods for CorePost objects.

Tags
abstract

Table of Contents

$modifiedDateObj  : Carbon|null
$publishedDateObj  : Carbon|null
$storage  : array<string|int, mixed>
categories()  : array<string|int, mixed>
Overrides parent::categories() so that we store the data.
excerpt()  : string
Get the post excerpt by returning the `post_excerpt` property set by Wordpress. If this property is not set, the content is truncated and used as the excerpt.
getModifiedDate()  : Carbon|null
Returns the modifed date as a Carbon obj.
getPublishedDate()  : Carbon|null
Returns the published date as a Carbon obj.
refreshCategories()  : CorePost
Pulls fresh category data. Heads up, this incurs a db hit.
refreshTags()  : CorePost
Pulls fresh tag data. Heads up, this incurs a db hit.
tags()  : array<string|int, mixed>
Overrides parent::tags() so that we store the data.

Properties

$modifiedDateObj

private Carbon|null $modifiedDateObj = null

$publishedDateObj

private Carbon|null $publishedDateObj = null

$storage

private array<string|int, mixed> $storage = []

Methods

categories()

Overrides parent::categories() so that we store the data.

public categories() : array<string|int, mixed>
Return values
array<string|int, mixed>

excerpt()

Get the post excerpt by returning the `post_excerpt` property set by Wordpress. If this property is not set, the content is truncated and used as the excerpt.

public excerpt() : string
Return values
string

getModifiedDate()

Returns the modifed date as a Carbon obj.

public getModifiedDate() : Carbon|null
Return values
Carbon|null

getPublishedDate()

Returns the published date as a Carbon obj.

public getPublishedDate() : Carbon|null
Return values
Carbon|null

refreshCategories()

Pulls fresh category data. Heads up, this incurs a db hit.

public refreshCategories() : CorePost
Return values
CorePost

refreshTags()

Pulls fresh tag data. Heads up, this incurs a db hit.

public refreshTags() : CorePost
Return values
CorePost

tags()

Overrides parent::tags() so that we store the data.

public tags() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results