Use the attachment metadata to get the size infomation rather than making an HTTP request for the image in the attachment template.

git-svn-id: https://develop.svn.wordpress.org/trunk@14700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-05-16 21:02:34 +00:00
parent a0740155c5
commit fec613607a
1 changed files with 3 additions and 3 deletions

View File

@ -42,13 +42,13 @@
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$size = getimagesize( wp_get_attachment_url() );
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten'),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __('Link to full-size image', 'twentyten') ),
$size[0],
$size[1]
$metadata['width'],
$metadata['height']
)
);
}