Core Function
View Source on Trac ↗ _wp_translate_postdata()
_wp_translate_postdata( mixed $update = false, mixed $post_data = null ) Renames `$_POST` data from form names to DB post columns.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $update bool | Whether the post already exists. |
| mixed | (array | null) $post_data Optional. The array of post data to process. Defaults to the `$_POST` superglobal. Required |
Return Value
((array)
| WP_Error) Array of post data on success, WP_Error on failure.
Function Information
Since Version
2.6.0
Source File
wp-admin/includes/post.php
Advertisement