%2$s',
esc_url( get_permalink() ),
/* translators: %s: Name of current post */
wp_kses_data( $more_tag_text ) . '' . get_the_title( get_the_ID() ) . ''
);
return $link;
}
endif;
add_filter( 'excerpt_more', 'awpbusinesspress_excerpt_more' );
if ( ! function_exists( 'awpbusinesspress_custom_excerpt' ) ) :
/**
* Adds Continue reading link to more tag excerpts.
*
* function tied to the get_the_excerpt filter hook.
*
* @since awpbusinesspress Pro 1.0
*/
function awpbusinesspress_custom_excerpt( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
$more_tag_text = get_theme_mod( 'awpbusinesspress_excerpt_more_text', esc_html__( 'Continue Reading', 'awpbusinesspress' ) );
$link = sprintf(
'%2$s
',
esc_url( get_permalink() ),
/* translators: %s: Name of current post */
wp_kses_data( $more_tag_text ) . '' . get_the_title( get_the_ID() ) . ''
);
$link = ' … ' . $link;
$output .= $link;
}
return $output;
}
endif; // awpbusinesspress_custom_excerpt.
add_filter( 'get_the_excerpt', 'awpbusinesspress_custom_excerpt' );
if ( ! function_exists( 'awpbusinesspress_more_link' ) ) :
/**
* Replacing Continue reading link to the_content more.
*
* function tied to the the_content_more_link filter hook.
*
* @since awpbusinesspress Pro 1.0
*/
function awpbusinesspress_more_link( $more_link, $more_link_text ) {
$more_tag_text = get_theme_mod( 'awpbusinesspress_excerpt_more_text', esc_html__( 'Continue Reading', 'awpbusinesspress' ) );
return ' … ' . str_replace( $more_link_text, wp_kses_data( $more_tag_text ), $more_link );
}
endif; // awpbusinesspress_more_link.
add_filter( 'the_content_more_link', 'awpbusinesspress_more_link', 10, 2 );