mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Twenty Ten and Eleven: *_continue_reading_link() should be pluggable, fixes #16500. Props nacin and SergeyBiryukov.
git-svn-id: http://core.svn.wordpress.org/trunk@21490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2fe505e25a
commit
27281f6fd1
@ -337,12 +337,14 @@ function twentyeleven_excerpt_length( $length ) {
|
|||||||
}
|
}
|
||||||
add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
|
add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
|
||||||
/**
|
/**
|
||||||
* Returns a "Continue Reading" link for excerpts
|
* Returns a "Continue Reading" link for excerpts
|
||||||
*/
|
*/
|
||||||
function twentyeleven_continue_reading_link() {
|
function twentyeleven_continue_reading_link() {
|
||||||
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>';
|
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>';
|
||||||
}
|
}
|
||||||
|
endif; // twentyeleven_continue_reading_link
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
|
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
|
||||||
|
@ -243,6 +243,7 @@ function twentyten_excerpt_length( $length ) {
|
|||||||
}
|
}
|
||||||
add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
|
add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'twentyten_continue_reading_link' ) ) :
|
||||||
/**
|
/**
|
||||||
* Returns a "Continue Reading" link for excerpts
|
* Returns a "Continue Reading" link for excerpts
|
||||||
*
|
*
|
||||||
@ -252,6 +253,7 @@ add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
|
|||||||
function twentyten_continue_reading_link() {
|
function twentyten_continue_reading_link() {
|
||||||
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) . '</a>';
|
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) . '</a>';
|
||||||
}
|
}
|
||||||
|
endif;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().
|
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().
|
||||||
|
Loading…
Reference in New Issue
Block a user