Revert [7700] from trunk in preparation for a different #6444 solution

git-svn-id: https://develop.svn.wordpress.org/trunk@7814 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-04-25 00:43:44 +00:00
parent eae779df32
commit 24a68a43b4
3 changed files with 21 additions and 41 deletions
+5 -5
View File
@@ -287,7 +287,7 @@ function image_get_intermediate_size($post_id, $size='thumbnail') {
if ( is_array($size) || empty($size) || empty($imagedata['sizes'][$size]) )
return false;
$data = $imagedata['sizes'][$size];
// include the full filesystem path of the intermediate file
if ( empty($data['path']) && !empty($data['file']) ) {
@@ -301,7 +301,7 @@ function image_get_intermediate_size($post_id, $size='thumbnail') {
// get an image to represent an attachment - a mime icon for files, thumbnail or intermediate size for images
// returns an array (url, width, height), or false if no image is available
function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = false) {
// get a thumbnail or intermediate image if there is one
if ( $image = image_downsize($attachment_id, $size) )
return $image;
@@ -328,11 +328,11 @@ function wp_get_attachment_image($attachment_id, $size='thumbnail', $icon = fals
$size = join('x', $size);
$html = '<img src="'.attribute_escape($src).'" '.$hwstring.'class="attachment-'.attribute_escape($size).'" alt="" />';
}
return $html;
}
add_shortcode('gallery', 'gallery_shortcode', true);
add_shortcode('gallery', 'gallery_shortcode');
function gallery_shortcode($attr) {
global $post;
@@ -377,7 +377,7 @@ function gallery_shortcode($attr) {
$captiontag = tag_escape($captiontag);
$columns = intval($columns);
$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
$output = apply_filters('gallery_style', "
<style type='text/css'>
.gallery {