函数原型
image_attachment_fields_to_save( array $post, array $attachment ): array
函数描述
Was used to filter input from media_upload_form_handler() and to assign a default post_title from the file name if none supplied.
是否弃用
Warning: This function has been deprecated.
函数参数
-
$post
array
Required - The WP_Post attachment object converted to an array.
-
$attachment
array
Required - An array of attachment metadata.
函数返回值
array Attachment post object converted to an array.
函数位置
File: wp-admin/includes/deprecated.php.
函数源码
function image_attachment_fields_to_save( $post, $attachment ) {
_deprecated_function( __FUNCTION__, '6.0.0' );
return $post;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 6.0.0 | This function has been deprecated. |
| 2.5.0 | Introduced. |

