mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Better attachment template. Hat tip: Andy. Fixes #6150.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9c8a54f24a
commit
b0cf57810e
@ -8,12 +8,10 @@
|
||||
<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_attribute(); ?>"><?php the_title(); ?></a></h2>
|
||||
<div class="entry">
|
||||
<p class="<?php echo $classname; ?>"><?php echo $attachment_link; ?><br /><?php echo basename($post->guid); ?></p>
|
||||
<p class="attachment"><?php echo wp_get_attachment_link(0, 'medium', false); ?></p>
|
||||
|
||||
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user