Add some defaults for wp_insert_attachment. fixes #6006

git-svn-id: http://svn.automattic.com/wordpress/trunk@7042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-26 18:51:45 +00:00
parent de3ab9a05e
commit 1b08613a81
1 changed files with 2 additions and 1 deletions

View File

@ -1986,7 +1986,8 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
$defaults = array('post_status' => 'draft', 'post_type' => 'post', 'post_author' => $user_ID,
'ping_status' => get_option('default_ping_status'), 'post_parent' => 0,
'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => '');
'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => '',
'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '');
$object = wp_parse_args($object, $defaults);
if ( !empty($parent) )