class WpPost extends Model

Constants

POST_TYPE

CREATED_AT

Timestamps *

UPDATED_AT

Properties

protected $table Model Settings *
protected $primaryKey
protected $guarded
protected $hidden
protected $dates
$appends Appendable Attributes *

Methods

string
getPermalinkAttribute()

Get Permalink by Traversal

HasOne
parent()

Post Parent Relationship

BelongsTo
author()

Post Author Relationship

HasMany
children()

Post Children Relationship

WP_Post
toWpPost()

Convert Eloquent Model to WP_Post Object

mixed
getMeta(string $meta_key, boolean $load_as_relations = false)

Get WpMeta Fields

HasMany
meta()

Post Meta Relationship

HasManyThrough
taxonomy()

Taxonomy Relationship

bool
attachTaxonomy($taxonomy_id)

Attach Taxonomy Relationship

bool
detachTaxonomy($taxonomy_id)

DeAttach Taxonomy Relationship

mixed
getPostContentAttribute($value)

Get Post Content Formatted

Carbon
getPostDateAttribute($value)

Get Post Date Attribute

Carbon
getPostModifiedAttribute($value)

Get Post Modified Attribute

static 
boot()

Model Callbacks - Set additional WP_POST dates

Details

at line 30
string getPermalinkAttribute()

Get Permalink by Traversal

Return Value

string

at line 46
HasOne parent()

Post Parent Relationship

Return Value

HasOne

at line 54
BelongsTo author()

Post Author Relationship

Return Value

BelongsTo

at line 62
HasMany children()

Post Children Relationship

Return Value

HasMany

at line 70
WP_Post toWpPost()

Convert Eloquent Model to WP_Post Object

Return Value

WP_Post

at line 81
mixed getMeta(string $meta_key, boolean $load_as_relations = false)

Get WpMeta Fields

Parameters

string $meta_key
boolean $load_as_relations

Return Value

mixed

at line 105
HasMany meta()

Post Meta Relationship

Return Value

HasMany

at line 113
HasManyThrough taxonomy()

Taxonomy Relationship

Return Value

HasManyThrough

at line 128
bool attachTaxonomy($taxonomy_id)

Attach Taxonomy Relationship

Parameters

$taxonomy_id

Return Value

bool

at line 145
bool detachTaxonomy($taxonomy_id)

DeAttach Taxonomy Relationship

Parameters

$taxonomy_id

Return Value

bool

at line 160
mixed getPostContentAttribute($value)

Get Post Content Formatted

Parameters

$value

Return Value

mixed

at line 169
Carbon getPostDateAttribute($value)

Get Post Date Attribute

Parameters

$value

Return Value

Carbon

at line 178
Carbon getPostModifiedAttribute($value)

Get Post Modified Attribute

Parameters

$value

Return Value

Carbon

at line 185
static protected boot()

Model Callbacks - Set additional WP_POST dates