Add defaults for 'post_content' and 'post_title' in wp_insert_post(). See #11889.

git-svn-id: https://develop.svn.wordpress.org/trunk@12990 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-02-06 14:49:54 +00:00
parent 86233c4dbd
commit 1cec5d58ef
1 changed files with 2 additions and 1 deletions

View File

@ -1919,7 +1919,8 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
$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' => '',
'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0);
'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0,
'post_content' => '', 'post_title' => '');
$postarr = wp_parse_args($postarr, $defaults);
$postarr = sanitize_post($postarr, 'db');