_wp_translate_postdata( bool $update = false, array|null $post_data = null ): array|WP_Error

Renames $_POST data from form names to DB post columns.

Description

Manipulates $_POST directly.

Parameters

$updatebooloptional
Whether the post already exists.

Default:false

$post_dataarray|nulloptional
The array of post data to process.
Defaults to the $_POST superglobal.

Default:null