mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 18:32:23 +01:00
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: http://svn.automattic.com/wordpress/trunk@14700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
01389755c7
commit
32b4cbe0da
@ -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 × %4$s</a>',
|
||||
wp_get_attachment_url(),
|
||||
esc_attr( __('Link to full-size image', 'twentyten') ),
|
||||
$size[0],
|
||||
$size[1]
|
||||
$metadata['width'],
|
||||
$metadata['height']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user