image_attachment_fields_to_save

函数


image_attachment_fields_to_save ( $post, $attachment )
参数
  • (array)
    $post
    The WP_Post attachment object converted to an array.
    Required:
  • (array)
    $attachment
    An array of attachment metadata.
    Required:
返回值
  • (array) Attachment post object converted to an array.
定义位置
  • wp-admin/includes/deprecated.php
    , line 1582
引入
2.5.0
弃用
6.0.0

Was used to filter input from media_upload_form_handler() and to assign a default
post_title from the file name if none supplied.

function image_attachment_fields_to_save( $post, $attachment ) {
	_deprecated_function( __FUNCTION__, '6.0.0' );

	return $post;
}