WordPress at a glance
function is not described

write_post() WP 2.0.0

Calls wp_write_post() and handles the errors.

No Hooks.

Return

Int/null.

Usage

write_post();

Code of write post: wp-admin/includes/post.php VER 5.0.3

<?php
function write_post() {
	$result = wp_write_post();
	if ( is_wp_error( $result ) )
		wp_die( $result->get_error_message() );
	else
		return $result;
}