Make WordPress Core


Ignore:
Timestamp:
02/16/2008 09:54:47 PM (16 years ago)
Author:
ryan
Message:

Media handling updates from andy. fixes #5874

File:
1 edited

Legend:

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

    r6711 r6876  
    367367}
    368368
    369 function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false) {
     369function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
    370370    $id = (int) $id;
    371371    $_post = & get_post($id);
     
    373373    if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
    374374        return __('Missing Attachment');
     375
     376    if ( $permalink )
     377        $url = get_attachment_link($_post->ID);
    375378
    376379    $post_title = attribute_escape($_post->post_title);
Note: See TracChangeset for help on using the changeset viewer.