Changeset 2524 for trunk/wp-includes/functions.php
- Timestamp:
- 04/09/2005 05:25:47 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2523 r2524 462 462 } 463 463 464 // Deprecated. Use get_post(). 464 465 function get_postdata($postid) { 465 global $post, $wpdb; 466 467 if ( $postid == $post->ID ) 468 $a_post = $post; 469 else 470 $a_post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$postid'"); 466 $post = &get_post($postid); 471 467 472 468 $postdata = array ( 473 'ID' => $ a_post->ID,474 'Author_ID' => $ a_post->post_author,475 'Date' => $ a_post->post_date,476 'Content' => $ a_post->post_content,477 'Excerpt' => $ a_post->post_excerpt,478 'Title' => $ a_post->post_title,479 'Category' => $ a_post->post_category,480 'post_status' => $ a_post->post_status,481 'comment_status' => $ a_post->comment_status,482 'ping_status' => $ a_post->ping_status,483 'post_password' => $ a_post->post_password,484 'to_ping' => $ a_post->to_ping,485 'pinged' => $ a_post->pinged,486 'post_name' => $ a_post->post_name469 'ID' => $post->ID, 470 'Author_ID' => $post->post_author, 471 'Date' => $post->post_date, 472 'Content' => $post->post_content, 473 'Excerpt' => $post->post_excerpt, 474 'Title' => $post->post_title, 475 'Category' => $post->post_category, 476 'post_status' => $post->post_status, 477 'comment_status' => $post->comment_status, 478 'ping_status' => $post->ping_status, 479 'post_password' => $post->post_password, 480 'to_ping' => $post->to_ping, 481 'pinged' => $post->pinged, 482 'post_name' => $post->post_name 487 483 ); 484 488 485 return $postdata; 489 486 }
Note: See TracChangeset
for help on using the changeset viewer.