/* Twenty Ten custom 'continue reading'
/
/ custom field ($key = 'cont_read' ) dependant 'continue reading' text
/ alchymyth 2010
*/
class Transformation_Text_Wrangler {
function reading_more($translation, $text, $domain) {
global $post;
$cont_read = get_post_meta( $post->ID, 'cont_read', true );
if( $cont_read ) :
$cont_read = htmlentities($cont_read, ENT_QUOTES);
$translations = &get_translations_for_domain( $domain );
if ( $text == 'Continue reading <span class="meta-nav">→</span>' ) {
return $translations->translate( $cont_read . ' <span class="meta-nav">»</span>' );
}
return $translation; // custom field value
else :
return $translation; // standard text
endif;
}
}
add_filter('gettext', array('Transformation_Text_Wrangler', 'reading_more'), 10, 4);
extended, from:
https://www.transformationpowertools.com/wordpress/read-more-in-twenty-ten-child-theme