Filter hook 'attachment_fields_to_save'

in WP Core File wp-admin/includes/post.php at line 435

Description

Updates an existing post with values provided in `$_POST`. If post data is passed as an argument, it is treated as an array of data keyed appropriately for turning into a post object. If post data is not passed, the `$_POST` global variable is used instead.

Occurrences

Filename Line Number
wp-admin/includes/post.php 435
wp-admin/includes/ajax-actions.php 3224
wp-admin/includes/media.php 792

Parameters

Type Name Description
array|null $post_data Optional. The array of post data to process. Defaults to the `$_POST` superglobal.

PHP Doc

/**
 * Updates an existing post with values provided in `$_POST`.
 *
 * If post data is passed as an argument, it is treated as an array of data
 * keyed appropriately for turning into a post object.
 *
 * If post data is not passed, the `$_POST` global variable is used instead.
 *
 * @since 1.5.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param array|null $post_data Optional. The array of post data to process.
 *                              Defaults to the `$_POST` superglobal.
 * @return int Post ID.
 */