Ticket #20803: media.php.patch
| File media.php.patch, 808 bytes (added by , 14 years ago) |
|---|
-
media.php
861 861 } 862 862 863 863 /** 864 * {@internal Missing Short Description}} 864 * Filters input from media_upload_form_handler() and assigns a default 865 * post_title from the file name if none supplied. 865 866 * 867 * Illustrates the use of the attachment_fields_to_save filter 868 * which can be used to add default values to any field before saving to DB. 869 * 866 870 * @since 2.5.0 867 871 * 868 * @param unknown_type$post869 * @param unknown_type$attachment870 * @return unknown872 * @param array $post 873 * @param array $attachment 874 * @return array 871 875 */ 872 876 function image_attachment_fields_to_save($post, $attachment) { 873 877 if ( substr($post['post_mime_type'], 0, 5) == 'image' ) {