Make WordPress Core


Ignore:
Timestamp:
11/26/2008 02:27:37 AM (16 years ago)
Author:
azaozz
Message:

Move Gallery Settings to the Gallery tab in the uploader, split the Upload tab in "From Computer" and "From URL" tabs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r9847 r9894  
    523523 * @param string $size Optional, default is 'thumbnail'.
    524524 * @param bool $icon Optional, default is false. Whether it is an icon.
    525  * @param int $imgwidth Override image width.
    526525 * @return string HTML img element or empty string on failure.
    527526 */
    528 function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false, $imgwidth = false) {
     527function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false) {
    529528
    530529    $html = '';
     
    532531    if ( $image ) {
    533532        list($src, $width, $height) = $image;
    534         $hwstring = $imgwidth ? image_hwstring($imgwidth, '') : image_hwstring($width, $height);
     533        $hwstring = image_hwstring($width, $height);
    535534        if ( is_array($size) )
    536535            $size = join('x', $size);
     
    619618        'captiontag' => 'dd',
    620619        'columns'    => 3,
    621         'size'       => 'thumbnail',
    622         'imgwidth'   => ''
     620        'size'       => 'thumbnail'
    623621    ), $attr));
    624622
     
    640638    $columns = intval($columns);
    641639    $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
    642     $imgwidth = isset($imgwidth) && (int) $imgwidth ? $imgwidth : false;
    643640
    644641    $output = apply_filters('gallery_style', "
     
    664661    $i = 0;
    665662    foreach ( $attachments as $id => $attachment ) {
    666         $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false, $imgwidth) : wp_get_attachment_link($id, $size, true, false, $imgwidth);
     663        $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
    667664
    668665        $output .= "<{$itemtag} class='gallery-item'>";
Note: See TracChangeset for help on using the changeset viewer.