Make WordPress Core

Changeset 10520


Ignore:
Timestamp:
02/07/2009 02:58:21 AM (16 years ago)
Author:
azaozz
Message:

Fix wp_get_attachment_link(), props noel, fixes #9036

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r10495 r10520  
    931931    } elseif ( ( is_int($size) && $size != 0 ) or ( is_string($size) && $size != 'none' ) or $size != false ) {
    932932        $link_text = wp_get_attachment_image($id, $size, $icon);
    933     } else {
     933    }
     934
     935    if( trim($link_text) == '' )
    934936        $link_text = $_post->post_title;
    935     }
    936937   
    937     return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon );
     938    return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon, $text );
    938939}
    939940
Note: See TracChangeset for help on using the changeset viewer.