Ticket #23543: 23543.1.diff

File 23543.1.diff, 1020 bytes (added by obenland, 3 months ago)
  • wp-content/themes/twentythirteen/functions.php

     
    544544add_filter( 'the_content', 'twentythirteen_aside_date', 8 ); // After embeds, before everything else. 
    545545 
    546546/** 
     547 * Add anchor hash to image attachment links. 
     548 * 
     549 * Appends a hash anchor to attachment link URLs, which moves the focus down to 
     550 * the main content area to view the image when the attachment page loads. 
     551 * 
     552 * @since Twenty Thirteen 1.0 
     553 * 
     554 * @param string $url The image attachment URL 
     555 * @return string 
     556 */ 
     557function twentythirteen_attachment_link( $url ) { 
     558        if ( wp_attachment_is_image() ) 
     559                $url .= '#main'; 
     560 
     561        return $url; 
     562} 
     563add_filter( 'attachment_link', 'twentythirteen_attachment_link' ); 
     564 
     565/** 
    547566 * Add postMessage support for site title and description for the Customizer. 
    548567 * 
    549568 * @since Twenty Thirteen 1.0