Changeset 14889
- Timestamp:
- 05/25/2010 04:08:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/functions.php
r14832 r14889 245 245 246 246 /** 247 * Sets the "read more" link to something pretty. 247 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis. 248 * 249 * To override this in a child theme, remove the filter and add your own 250 * function tied to the excerpt_more filter hook. 251 * 252 * @since Twenty Ten 1.0 253 * @return string An ellipsis 254 */ 255 function twentyten_auto_excerpt_more( $more ) { 256 return ' …'; 257 } 258 add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); 259 260 /** 261 * Adds a pretty "Continue Reading" link to post excerpts. 248 262 * 249 263 * To override this link in a child theme, remove the filter and add your own 250 * function tied to the excerpt_morefilter hook.251 * 252 * @since Twenty Ten 1.0 253 * @return string A pretty 'Continue reading' link.254 */ 255 function twentyten_ excerpt_more( $more) {256 return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>';257 } 258 add_filter( ' excerpt_more', 'twentyten_excerpt_more' );264 * function tied to the get_the_excerpt filter hook. 265 * 266 * @since Twenty Ten 1.0 267 * @return string Excerpt with a pretty "Continue Reading" link 268 */ 269 function twentyten_custom_excerpt_more( $output ) { 270 return $output . ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) . '</a>'; 271 } 272 add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' ); 259 273 260 274 /**
Note: See TracChangeset
for help on using the changeset viewer.