Make WordPress Core


Ignore:
Timestamp:
12/19/2005 07:08:30 PM (19 years ago)
Author:
ryan
Message:

Attachment template fix. fixes #2098

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/default/attachment.php

    r3303 r3328  
    99            <div class="alignright">&nbsp;</div>
    1010        </div>
     11<?php $attachment_link = get_the_attachment_link($post->ID, true, array(450, 800)); // This also populates the iconsize for the next line ?>
     12<?php $_post = &get_post($post->ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment'; // This lets us style narrow icons specially ?>
    1113        <div class="post" id="post-<?php the_ID(); ?>">
    1214            <h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &raquo; <a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    1315            <div class="entrytext">
    14                 <p class="<?php $link = get_the_attachment_link($post->ID, true, array(450, 800)); /* Doing this now populates the imagesize stuff */ echo $post->iconsize[0] <= 128 ? 'small' : ''; ?>attachment"><?php echo get_the_attachment_link($post->ID, true, array(450, 800)); ?><br /><?php echo basename($post->guid); ?></p>
     16                <p class="<?php echo $classname; ?>"><?php echo $attachment_link; ?><br /><?php echo basename($post->guid); ?></p>
    1517
    1618                <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
Note: See TracChangeset for help on using the changeset viewer.