mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Attachment template fix. fixes #2098
git-svn-id: http://svn.automattic.com/wordpress/trunk@3328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
beca0741ca
commit
dbbd5efeb2
@ -8,10 +8,12 @@
|
||||
<div class="alignleft"> </div>
|
||||
<div class="alignright"> </div>
|
||||
</div>
|
||||
<?php $attachment_link = get_the_attachment_link($post->ID, true, array(450, 800)); // This also populates the iconsize for the next line ?>
|
||||
<?php $_post = &get_post($post->ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment'; // This lets us style narrow icons specially ?>
|
||||
<div class="post" id="post-<?php the_ID(); ?>">
|
||||
<h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> » <a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
|
||||
<div class="entrytext">
|
||||
<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>
|
||||
<p class="<?php echo $classname; ?>"><?php echo $attachment_link; ?><br /><?php echo basename($post->guid); ?></p>
|
||||
|
||||
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user