Twenty Ten and Eleven: *_continue_reading_link() should be pluggable, fixes #16500. Props nacin and SergeyBiryukov.

git-svn-id: https://develop.svn.wordpress.org/trunk@21490 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2012-08-09 18:21:58 +00:00
parent ced74a6194
commit fc4fffaad5
2 changed files with 4 additions and 0 deletions

View File

@ -337,12 +337,14 @@ function twentyeleven_excerpt_length( $length ) {
}
add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
/**
* Returns a "Continue Reading" link for excerpts
*/
function twentyeleven_continue_reading_link() {
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
}
endif; // twentyeleven_continue_reading_link
/**
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().

View File

@ -243,6 +243,7 @@ function twentyten_excerpt_length( $length ) {
}
add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
if ( ! function_exists( 'twentyten_continue_reading_link' ) ) :
/**
* Returns a "Continue Reading" link for excerpts
*
@ -252,6 +253,7 @@ add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
function twentyten_continue_reading_link() {
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
}
endif;
/**
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().