PHPDoc for WP_Post properties. fixes #25092.

git-svn-id: https://develop.svn.wordpress.org/trunk@25086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-08-22 15:57:31 +00:00
parent c8889d984f
commit 562b65d822
1 changed files with 33 additions and 13 deletions

View File

@ -424,160 +424,180 @@ function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) {
final class WP_Post { final class WP_Post {
/** /**
* Post ID.
* *
* @var int * @var int
*/ */
public $ID; public $ID;
/** /**
* ID of post author.
* *
* @var int * A numeric string, for compatibility reasons.
*
* @var string
*/ */
public $post_author = 0; public $post_author = 0;
/** /**
* The post's local publication time.
* *
* @var string * @var string
*/ */
public $post_date = '0000-00-00 00:00:00'; public $post_date = '0000-00-00 00:00:00';
/** /**
* The post's GMT publication time.
* *
* @var string * @var string
*/ */
public $post_date_gmt = '0000-00-00 00:00:00'; public $post_date_gmt = '0000-00-00 00:00:00';
/** /**
* The post's content.
* *
* @var string * @var string
*/ */
public $post_content = ''; public $post_content = '';
/** /**
* The post's title.
* *
* @var string * @var string
*/ */
public $post_title = ''; public $post_title = '';
/** /**
* The post's excerpt.
* *
* @var string * @var string
*/ */
public $post_excerpt = ''; public $post_excerpt = '';
/** /**
* The post's status.
* *
* @var string * @var string
*/ */
public $post_status = 'publish'; public $post_status = 'publish';
/** /**
* Whether comments are allowed.
* *
* @var string * @var string
*/ */
public $comment_status = 'open'; public $comment_status = 'open';
/** /**
* Whether pings are allowed.
* *
* @var string * @var string
*/ */
public $ping_status = 'open'; public $ping_status = 'open';
/** /**
* The post's password in plain text.
* *
* @var string * @var string
*/ */
public $post_password = ''; public $post_password = '';
/** /**
* The post's slug.
* *
* @var string * @var string
*/ */
public $post_name = ''; public $post_name = '';
/** /**
* URLs queued to be pinged.
* *
* @var string * @var string
*/ */
public $to_ping = ''; public $to_ping = '';
/** /**
* URLs that have been pinged.
* *
* @var string * @var string
*/ */
public $pinged = ''; public $pinged = '';
/** /**
* The post's local modified time.
* *
* @var string * @var string
*/ */
public $post_modified = '0000-00-00 00:00:00'; public $post_modified = '0000-00-00 00:00:00';
/** /**
* The post's GMT modified time.
* *
* @var string * @var string
*/ */
public $post_modified_gmt = '0000-00-00 00:00:00'; public $post_modified_gmt = '0000-00-00 00:00:00';
/** /**
* A utility DB field for post content.
*
* *
* @var string * @var string
*/ */
public $post_content_filtered = ''; public $post_content_filtered = '';
/** /**
* ID of a post's parent post.
* *
* @var int * @var int
*/ */
public $post_parent = 0; public $post_parent = 0;
/** /**
* The unique identifier for a post, not necessarily a URL, used as the feed GUID.
* *
* @var string * @var string
*/ */
public $guid = ''; public $guid = '';
/** /**
* A field used for ordering posts.
* *
* @var int * @var int
*/ */
public $menu_order = 0; public $menu_order = 0;
/** /**
* The post's type, like pot or page.
* *
* @var string * @var string
*/ */
public $post_type = 'post'; public $post_type = 'post';
/** /**
* An attachment's mime type.
* *
* @var string * @var string
*/ */
public $post_mime_type = ''; public $post_mime_type = '';
/** /**
* Cached comment count.
* *
* @var int * A numeric string, for compatibility reasons.
*
* @var string
*/ */
public $comment_count = 0; public $comment_count = 0;
/** /**
* Stores the post object's sanitization level.
*
* Does not correspond to a DB field.
* *
* @var string * @var string
*/ */
public $filter; public $filter;
/**
* Private variable used by post formats to cache parsed content.
*
* @since 3.6.0
*
* @var array
* @access private
*/
public $format_content;
public static function get_instance( $post_id ) { public static function get_instance( $post_id ) {
global $wpdb; global $wpdb;