Creating intermediate sizes, better thumbnails, and other image improvements. Hat tip: tellyworth.

git-svn-id: https://develop.svn.wordpress.org/trunk@7135 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2008-03-03 04:17:37 +00:00
parent 8415bccde9
commit 88bb527a19
7 changed files with 93 additions and 83 deletions

View File

@@ -389,11 +389,10 @@ function get_attachment_icon_src( $id = 0, $fullsize = false ) {
$file = get_attached_file( $post->ID );
if ( !$fullsize && $thumbfile = wp_get_attachment_thumb_file( $post->ID ) ) {
if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) {
// We have a thumbnail desired, specified and existing
$src = wp_get_attachment_thumb_url( $post->ID );
$src_file = $thumbfile;
$src_file = basename($src);
$class = 'attachmentthumb';
} elseif ( wp_attachment_is_image( $post->ID ) ) {
// We have an image without a thumbnail