Here what i found in post.php
**
* Insert a post.
*
* If the $postarr parameter has 'ID' set to a value, then post will be updated.
*
* You can set the post date manually, but setting the values for 'post_date'
* and 'post_date_gmt' keys. You can close the comments or open the comments by
* setting the value for 'comment_status' key.
*
* The defaults for the parameter $postarr are:
* 'post_status' - Default is 'draft'.
* 'post_type' - Default is 'post'.
* 'post_author' - Default is current user ID ($user_ID). The ID of the user who added the post.
* 'ping_status' - Default is the value in 'default_ping_status' option.
* Whether the attachment can accept pings.
* 'post_parent' - Default is 0. Set this for the post it belongs to, if any.
* 'menu_order' - Default is 0. The order it is displayed.
* 'to_ping' - Whether to ping.
* 'pinged' - Default is empty string.
* 'post_password' - Default is empty string. The password to access the attachment.
* 'guid' - Global Unique ID for referencing the attachment.
* 'post_content_filtered' - Post content filtered.
* 'post_excerpt' - Post excerpt.
*
* @since 1.0.0
* @link
http://core.trac.wordpress.org/ticket/9084 Bug report on 'wp_insert_post_data' filter.
* @uses $wpdb
* @uses $wp_rewrite
* @uses $user_ID
*
* @uses do_action() Calls 'pre_post_update' on post ID if this is an update.
* @uses do_action() Calls 'edit_post' action on post ID and post data if this is an update.
* @uses do_action() Calls 'save_post' and 'wp_insert_post' on post id and post data just before
* returning.
*
* @uses apply_filters() Calls 'wp_insert_post_data' passing $data, $postarr prior to database
* update or insert.
* @uses wp_transition_post_status()
*
* @param array $postarr Optional. Overrides defaults.
* @param bool $wp_error Optional. Allow return of WP_Error on failure.
* @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success.
*/
function wp_insert_post($postarr = array(), $wp_error = false) {
global $wpdb, $wp_rewrite, $user_ID;
$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);
$postarr = wp_parse_args($postarr, $defaults);
$postarr = sanitize_post($postarr, 'db');
// export array as variables
extract($postarr, EXTR_SKIP);