Advertisements

get_postdata

Definition:
function get_postdata($postid) {}

Entire Post data.

Parameters

  • int $postid

Source code

function get_postdata($postid) {

	_deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );



	$post = &get_post($postid);



	$postdata = array (

		'ID' => $post->ID,

		'Author_ID' => $post->post_author,

		'Date' => $post->post_date,

		'Content' => $post->post_content,

		'Excerpt' => $post->post_excerpt,

		'Title' => $post->post_title,

		'Category' => $post->post_category,

		'post_status' => $post->post_status,

		'comment_status' => $post->comment_status,

		'ping_status' => $post->ping_status,

		'post_password' => $post->post_password,

		'to_ping' => $post->to_ping,

		'pinged' => $post->pinged,

		'post_type' => $post->post_type,

		'post_name' => $post->post_name

	);



	return $postdata;

}

1570

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: