Changeset 3303 for trunk/wp-content/themes/default/attachment.php
- Timestamp:
- 12/13/2005 07:19:56 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/default/attachment.php
r3251 r3303 12 12 <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> 13 13 <div class="entrytext"> 14 <?php $type = explode('/', $post->post_mime_type); 15 switch ( $type[0] ) { 16 case 'image' : 17 $meta = get_post_meta($post->ID, '_wp_attachment_metadata', true); 18 if ($meta['width'] > 450) : ?> 19 <p><a href="<?php echo $post->guid; ?>" title="<?php echo $post->post_title.': '.$meta['width'].'x'.$meta['height'] ?>"><img class="centered" src="<?php echo $post->guid; ?>" alt="<?php the_title(); ?>" style="width:450px;" /></a></p> 20 <?php else : ?> 21 <p><img class="centered" src="<?php echo $post->guid; ?>" alt="<?php the_title(); ?>" /></p> 22 <?php endif; 23 break; 24 default : 25 ?> 26 <p><a href="<?php echo $post->guid; ?>"><?php echo basename($post->guid); ?></a></p> 27 <?php 28 } 29 ?> 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> 15 30 16 <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> 31 17
Note: See TracChangeset
for help on using the changeset viewer.