wp-admin/includes/post.php:984Calls wp_write_post() and handles the errors.
int|voidfunction write_post() { $result = wp_write_post(); if ( is_wp_error( $result ) ) { wp_die( $result->get_error_message() ); } else { return $result; }}Introduced in 2.0.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
int|void to int.verified against sourcesrc/wp-admin/includes/post.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.