wpseek.com
A WordPress-centric search engine for devs and theme authors



write_post › WordPress Function

Since2.0.0
Deprecatedn/a
write_post ( No parameters )
Returns:
  • (int|void) Post ID on success, void on failure.
Defined at:
Codex:

Calls wp_write_post() and handles the errors.



Source

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