From f77b54271ad4c4ee8257e773f0070013eda88f15 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 28 Jun 2012 20:31:28 +0000 Subject: [PATCH] Inline documentation for image_attachment_fields_to_save(). props Moraleida.me. fixes #20803. git-svn-id: https://develop.svn.wordpress.org/trunk@21171 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 179bfb8fc5..81738b5c3d 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -861,13 +861,17 @@ function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { } /** - * {@internal Missing Short Description}} + * 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. * * @since 2.5.0 * - * @param unknown_type $post - * @param unknown_type $attachment - * @return unknown + * @param array $post + * @param array $attachment + * @return array */ function image_attachment_fields_to_save($post, $attachment) { if ( substr($post['post_mime_type'], 0, 5) == 'image' ) {