PHP Class mtv\wp\models\Post

Core post fields directly from WordPress: id // ID of the post post_author // ID of the post author post_date // timestamp in local time post_date_gmt // timestamp in gmt time post_content // Full body of the post post_title // title of the post post_excerpt // excerpt field of the post, caption if attachment post_status // post status: publish, new, pending, draft, auto-draft, future, private, inherit, trash comment_status // comment status: open, closed ping_status // ping/trackback status post_password // password of the post post_name // post slug, string to use in the URL to_ping // to ping ?? pinged // pinged ?? post_modified // timestamp in local time post_modified_gmt // timestatmp in gmt tim post_content_filtered // filtered content ?? post_parent // id of the parent post, if attachment, id of the post that uses this image guid // global unique id of the post menu_order // menu order post_type // type of post: post, page, attachment, or custom string post_mime_type // mime type for attachment posts comment_count // number of comments filter // filter ?? Special MTV fields: post_meta // an array containing all of the meta for this post blogid // id number of the blog this post lives on post_format // the post_format for this post url // attachments only, url of the original uploaded image or whatever thumb_url // attachments only, url of the thumbnail image, if thumbnails are enabled Post object functions password_required() Whether post requires password and correct password has been provided. is_sticky() Check if post is sticky. post_class() Retrieve the classes for the post div as an array. permalink() permalink for this post, from WP get_permalink() categories() returns an array of categories that are associated with this post tags() returns an array of tags that are associated with this post featured_image() Returns a Post object representing the featured image attachments( $extra_query_args ) Returns a PostCollection object representing attachments (gallery images) the_time( $format ) Returns a formatted date string. Works like WordPress's 'the_time'. the_date( $format ) Returns a formatted date string. Works like WordPress's 'the_date'. make_excerpt( $more_text ) Returns a generated excerpt. Simliar to how WordPress makes excerpts in The Loop.
Inheritance: extends mtv\models\Model
Datei anzeigen Open project: newsapps/wordpress-mtv Class Usage Examples

Public Properties

Property Type Description
$cache_groups

Public Methods

Method Description
__toString ( )
categories ( )
clear_attachments ( ) # TODO: optimize with SQL
featured_image ( )
fetch ( )
get_attachments ( )
is_sticky ( )
make_excerpt ( $more_text = null )
parse ( &$postdata )
password_required ( )
permalink ( )
post_class ( $class = '' )
save ( )
set_attachments ( $attachments )
tags ( )
the_content ( )
the_date ( $format = null )
the_time ( $format = null )

Method Details

__toString() public method

public __toString ( )

categories() public method

public categories ( )

clear_attachments() public method

# TODO: optimize with SQL
public clear_attachments ( )

fetch() public method

public fetch ( )

get_attachments() public method

public get_attachments ( )

is_sticky() public method

public is_sticky ( )

make_excerpt() public method

public make_excerpt ( $more_text = null )

parse() public method

public parse ( &$postdata )

password_required() public method

public password_required ( )

post_class() public method

public post_class ( $class = '' )

save() public method

public save ( )

set_attachments() public method

public set_attachments ( $attachments )

tags() public method

public tags ( )

the_content() public method

public the_content ( )

the_date() public method

public the_date ( $format = null )

the_time() public method

public the_time ( $format = null )

Property Details

$cache_groups public_oe property

public $cache_groups