WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-includes/post.php

    r15269 r15406  
    20772077
    20782078    $post = get_post($postid, $mode);
     2079
     2080    if (
     2081        ( OBJECT == $mode && empty( $post->ID ) ) ||
     2082        ( OBJECT != $mode && empty( $post['ID'] ) )
     2083    )
     2084        return ( OBJECT == $mode ? null : array() );
    20792085
    20802086    // Set categories and tags
     
    24192425
    24202426    // Drafts shouldn't be assigned a date unless explicitly done so by the user
    2421     if ( in_array($post['post_status'], array('draft', 'pending', 'auto-draft')) && empty($postarr['edit_date']) &&
     2427    if ( isset( $post['post_status'] ) && in_array($post['post_status'], array('draft', 'pending', 'auto-draft')) && empty($postarr['edit_date']) &&
    24222428             ('0000-00-00 00:00:00' == $post['post_date_gmt']) )
    24232429        $clear_date = true;
     
    25322538        $feeds = array();
    25332539
    2534     $hierarchical_post_types = apply_filters( 'hierarchical_post_types', array( 'page' ) );
     2540    $hierarchical_post_types = get_post_types( array('hierarchical' => true) );
    25352541    if ( 'attachment' == $post_type ) {
    25362542        // Attachment slugs must be unique across all types.
Note: See TracChangeset for help on using the changeset viewer.