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:
parent
de3ab9a05e
commit
1b08613a81
|
@ -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) )
|
||||
|
|
Loading…
Reference in New Issue