2020-05-02 / 2216阅 / 悠然
Filters input from media_upload_form_handler() and assigns a default post_title from the file name if none supplied.
Illustrates the use of the ‘attachment_fields_to_save’ filter which can be used to add default values to any field before saving to DB.
The WP_Post attachment object converted to an array.
An array of attachment metadata.
(array) Filtered attachment post object.