From 9c3151f5bb105aaf21f1a083220c09f8532fc7a1 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 12 Oct 2007 22:15:32 +0000 Subject: [PATCH] Use filename if no title. Props tellyworth. fixes #5080 for 2.3 git-svn-id: http://svn.automattic.com/wordpress/branches/2.3@6234 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/upload.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/includes/upload.php b/wp-admin/includes/upload.php index 1f21426ad0..0f37db7895 100644 --- a/wp-admin/includes/upload.php +++ b/wp-admin/includes/upload.php @@ -31,6 +31,9 @@ function wp_upload_display( $dims = false, $href = '' ) { $src = wp_make_link_relative( $src_base ); $src_base = str_replace($src, '', $src_base); + if ( !trim($post_title) ) + $post_title = basename($src); + $r = ''; if ( $href )