2020-05-02 / 2508阅 / 悠然
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.
(array)
(Required)
The WP_Post attachment object converted to an array.
(array)
(Required)
An array of attachment metadata.
(array) Filtered attachment post object.