Ticket #28251: 28251.4.diff
| File 28251.4.diff, 2.5 KB (added by , 12 years ago) |
|---|
-
src/wp-content/themes/twentyten/loop-attachment.php
18 18 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 19 19 20 20 <?php if ( ! empty( $post->post_parent ) ) : ?> 21 <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent); ?>" title="<?php echo esc_attr( sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) ) ); ?>" rel="gallery"><?php21 <p class="page-title"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) ) ); ?>" rel="gallery"><?php 22 22 /* translators: %s - title of parent post */ 23 23 printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) ); 24 24 ?></a></p> … … 52 52 $metadata = wp_get_attachment_metadata(); 53 53 printf( __( 'Full size is %s pixels', 'twentyten' ), 54 54 sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>', 55 wp_get_attachment_url(),55 esc_url( wp_get_attachment_url() ), 56 56 esc_attr( __( 'Link to full-size image', 'twentyten' ) ), 57 57 $metadata['width'], 58 58 $metadata['height'] … … 85 85 $next_attachment_url = wp_get_attachment_url(); 86 86 } 87 87 ?> 88 <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php88 <p class="attachment"><a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php 89 89 /** 90 90 * Filter the Twenty Ten default attachment width. 91 91 * … … 110 110 <div class="nav-next"><?php next_image_link( false ); ?></div> 111 111 </div><!-- #nav-below --> 112 112 <?php else : ?> 113 <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>113 <a href="<?php echo esc_url( wp_get_attachment_url() ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a> 114 114 <?php endif; ?> 115 115 </div><!-- .entry-attachment --> 116 116 <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>