WordPress.org

Make WordPress Core

Ticket #23543: 23543.diff

File 23543.diff, 796 bytes (added by DrewAPicture, 14 months ago)
  • wp-content/themes/twentythirteen/functions.php

     
    572572 * Adds support for a custom header image. 
    573573 */ 
    574574require( get_template_directory() . '/inc/custom-header.php' ); 
     575 
     576/** 
     577 * Add Anchor Hash to Attachment Page Navigation 
     578 * 
     579 * Appends a hash anchor to attachment link URLs, which jumps the page  
     580 * focus down to view the attachment when the attachment page loads. 
     581 * 
     582 * @since Twenty Thirteen 1.0 
     583 */ 
     584function twentythirteen_filter_attachment_url( $link ) { 
     585        return $link . '#main'; 
     586} 
     587add_filter( 'attachment_link', 'twentythirteen_filter_attachment_url' );