public
|
|
public
integer
|
#
getId( )
Get the post ID.
Returns
integer
|
public
string
|
#
getType( )
Get the post type.
Returns
string
|
public
string
|
#
getTypeName( )
Get the singular name for the post type of this post.
Get the singular name for the post type of this post.
Returns
string
|
public
stdClass
|
#
getTypeLabels( )
Get the post type labels for this post.
Get the post type labels for this post.
See:
http://codex.wordpress.org/Function_Reference/get_post_type_object
for the list of labels returned.
Returns
stdClass
|
public
string
|
#
getName( )
Get the post slug.
Returns
string
|
public
string
|
#
getStatus( )
Get the post status. One of:
Get the post status. One of:
- publish
- pending
- draft
- auto-draft
- future
- private
- inherit
- trash
Returns
string
|
public
string
|
#
getTitle( )
Get the post title.
Returns
string
|
public
string
|
#
getContent( )
Get the post content, formatted as HTML.
Get the post content, formatted as HTML.
Returns
string
|
public
string
|
#
getRawContent( )
Get the raw post content.
Get the raw post content.
Returns
string
|
public
boolean
|
#
hasExcerpt( )
Check if this post has a manually set excerpt.
Check if this post has a manually set excerpt.
Returns
boolean True if has excerpt, false if not
|
public
string
|
#
getExcerpt( string|null $content = null )
Get the post excerpt.
Adapted from wp_trim_excerpt() in wp-includes/formatting.php.
Parameters
- $content
Optional. Base content to use for excerpt
if post excerpt isn't defined. Defaults to
post content
Returns
string
|
public
string
|
#
getUrl( array $query = array() )
Get post URL.
Parameters
- $query
- Query string args. Key value pairs
Returns
string
|
public
Tev\Post\Model\Attachment |false
|
#
getFeaturedImage( )
Get this Post's featured image.
Get this Post's featured image.
Returns
|
public
string|null
|
#
getFeaturedImageUrl( mixed $size = 'thumbnail' )
Get Post featured image URL.
Get Post featured image URL.
Convenient alias for:
$pos->getFeaturedImage()->getImageUrl($size);
Parameters
- $size
- Arguments accepted by second param of wp_get_attachment_image_src()
Returns
string|null Image URL, or null if no image set
|
public
string
|
|
public
Tev\Author\Model\Author
|
|
public
integer|null
|
#
getParentPostId( )
Get the parent post ID.
Returns
integer|null Parent post ID or null if no parent
|
public
Tev\Post\Model\AbstractPost |null
|
#
getParent( )
Get the parent post, if set.
Get the parent post, if set.
Returns
|
public
Carbon\Carbon
|
#
getPublishedDate( )
Get the post published date.
Get the post published date.
Returns
Carbon\Carbon
|
public
Carbon\Carbon
|
#
getPublishedDateGmt( )
Get the post published date in GMT.
Get the post published date in GMT.
Returns
Carbon\Carbon
|
public
Carbon\Carbon
|
#
getModifiedDate( )
Get the post modified date.
Get the post modified date.
Returns
Carbon\Carbon
|
public
Carbon\Carbon
|
#
getModifiedDateGmt( )
Get the post modified date in GMT.
Get the post modified date in GMT.
Returns
Carbon\Carbon
|
public
Tev\Term\Model\Term[]
|
#
getCategories( )
Get all categories for this post.
Get all categories for this post.
Returns
|
public
Tev\Term\Model\Term[]
|
#
getTags( )
Get all tags for this post.
Get all tags for this post.
Returns
|
public
Tev\Term\Model\Term[]
|
#
getTermsFor( mixed|Tev\Taxonomy\Model\Taxonomy $taxonomy )
Get all terms for this post in the given taxonomy.
Get all terms for this post in the given taxonomy.
Parameters
- $taxonomy
- Taxonomy name or object
Returns
|
public
mixed
|
#
meta( string $key, boolean $single = true )
Get a meta value on this post.
Get a meta value on this post.
See: http://codex.wordpress.org/Function_Reference/get_post_meta for
how $single works.
Parameters
- $key
- Meta item key
- $single
- Optional. Defaults to true
Returns
mixed Meta data
|
public
Tev\Field\Model\AbstractField
|
#
field( string $name )
Get a custom field on this post.
Get a custom field on this post.
Parameters
- $name
- Field name (or key)
Returns
|
public
WP_Post
|
#
getBaseObject( )
Get the underlying WP_Post object.
Get the underlying WP_Post object.
Returns
WP_Post
Implementation of
|
protected
stdClass
|
#
getPostTypeObject( )
Get the post type object for this post.
Get the post type object for this post.
Contains information about the post type of this post.
Returns
stdClass
|