summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'themes/mantra/attachment.php')
-rw-r--r--themes/mantra/attachment.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/themes/mantra/attachment.php b/themes/mantra/attachment.php
index be1ce096..80e3fce4 100644
--- a/themes/mantra/attachment.php
+++ b/themes/mantra/attachment.php
@@ -15,7 +15,7 @@ get_header(); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
- <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'mantra' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
+ <p class="page-title"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'mantra' ), the_title_attribute('echo=0', $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( '<span class="meta-nav">&laquo;</span> %s', get_the_title( $post->post_parent ) );
?></a></p>
@@ -29,7 +29,7 @@ get_header(); ?>
printf('<span class="%1$s">'.__('By','mantra').'</span> %2$s',
'meta-prep meta-prep-author',
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
- get_author_posts_url( get_the_author_meta( 'ID' ) ),
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
sprintf( esc_attr__( 'View all posts by %s', 'mantra' ), get_the_author() ),
get_the_author()
)
@@ -49,7 +49,7 @@ get_header(); ?>
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'mantra'),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
- wp_get_attachment_url(),
+ esc_url( wp_get_attachment_url() ),
esc_attr( __('Link to full-size image', 'mantra') ),
$metadata['width'],
$metadata['height']
@@ -82,7 +82,7 @@ get_header(); ?>
$next_attachment_url = wp_get_attachment_url();
}
?>
- <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
+ <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
$attachment_size = apply_filters( 'mantra_attachment_size', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
@@ -92,7 +92,7 @@ get_header(); ?>
<div class="nav-next"><?php next_image_link( false ); ?> &raquo;</div>
</div><!-- #nav-below -->
<?php else : ?>
- <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
+ <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( esc_url( get_permalink() ) ); ?></a>
<?php endif; ?>
</div><!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
@@ -116,4 +116,5 @@ get_header(); ?>
<?php // get_sidebar(); // sidebars disabled on attachment page; alt css used ?>
</section><!-- #container -->
-<?php get_footer(); ?>
+<?php
+get_footer();