Changeset 14087
- Timestamp:
- 04/14/2010 03:20:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r14086 r14087 469 469 $post = get_post($ID); 470 470 471 if ( is_object($post) ) { 472 if ( ('attachment' == $post->post_type) && $post->post_parent && ($post->ID != $post->post_parent) ) 473 return get_post_status($post->post_parent); 474 else 475 return $post->post_status; 476 } 477 478 return false; 471 if ( !is_object($post) ) 472 return false; 473 474 // Unattached attachments are assumed to be published. 475 if ( ('attachment' == $post->post_type) && ('inherit' == $post->post_status) && ( 0 == $post->post_parent) ) 476 return 'publish'; 477 478 if ( ('attachment' == $post->post_type) && $post->post_parent && ($post->ID != $post->post_parent) ) 479 return get_post_status($post->post_parent); 480 481 return $post->post_status; 479 482 } 480 483
Note: See TracChangeset
for help on using the changeset viewer.