Fires immediately before a new post is inserted in the database.
$dataarraywp-includes/post.php:5025wp_insert_post() * Fires immediately before a new post is inserted in the database. * * @since 6.9.0 * * @param array $data Array of unslashed post data. */ do_action( 'pre_post_insert', $data ); if ( false === $wpdb->insert( $wpdb->posts, $data ) ) { if ( $wp_error ) { if ( 'attachment' === $post_type ) { $message = __( 'Could not insert attachment into the database.' ); } else {Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.