Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_postdata [ WordPress Function ]

get_postdata ( $postid )
Parameters:
  • (int) $postid
See:
Returns:
  • (array)
Defined at:



Entire Post data.

Source


<?php
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;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics