WordPress.org

Make WordPress Core

Ticket #13361: excerpt-attachment-check.diff

File excerpt-attachment-check.diff, 442 bytes (added by iandstewart, 4 years ago)

Don't add continue reading link to attachment templates

  • functions.php

     
    282282 * @return string Excerpt with a pretty "Continue Reading" link 
    283283 */ 
    284284function twentyten_custom_excerpt_more( $output ) { 
    285         if ( has_excerpt() ) { 
     285        if ( has_excerpt() && ! is_attachment() ) { 
    286286                $output .= twentyten_continue_reading_link(); 
    287287        } 
    288288        return $output;