WordPress.org

Make WordPress Core

Changeset 15358


Ignore:
Timestamp:
06/30/10 22:05:27 (4 years ago)
Author:
nacin
Message:

Curses on PHP 5.0.5. see #14160 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r15315 r15358  
    377377        foreach ( (array) $old_posts as $delete ) 
    378378            wp_delete_post( $delete, true ); // Force delete 
    379         $post = get_post( wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) ) ); 
     379        $post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) ); 
     380        $post = get_post( $post_id ); 
    380381    } else { 
    381382        $post->ID = 0; 
Note: See TracChangeset for help on using the changeset viewer.