astra_the_content_more_link( string $more_link_element = '', string $more_link_text = '' )
Filters the Read More link text.
Description
Parameters
- $more_link_element
-
(string) (Optional) Read More link element.
Default value: ''
- $more_link_text
-
(string) (Optional) Read More text.
Default value: ''
Return
(mixed) Markup.
Source
File: inc/blog/blog-config.php
function astra_the_content_more_link( $more_link_element = '', $more_link_text = '' ) {
$enabled = apply_filters( 'astra_the_content_more_link_enabled', '__return_true' );
if ( ( is_admin() && ! wp_doing_ajax() ) || ! $enabled ) {
return $more_link_element;
}
$more_link_text = apply_filters( 'astra_the_content_more_string', __( 'Read More »', 'astra' ) );
$read_more_classes = apply_filters( 'astra_the_content_more_link_class', array() );
$post_link = sprintf(
esc_html( '%s' ),
'<a class="' . esc_attr( implode( ' ', $read_more_classes ) ) . '" href="' . esc_url( get_permalink() ) . '"> ' . the_title( '<span class="screen-reader-text">', '</span>', false ) . $more_link_text . '</a>'
);
$more_link_element = ' …<p class="ast-the-content-more-link"> ' . $post_link . '</p>';
return apply_filters( 'astra_the_content_more_link', $more_link_element, $more_link_text );
}
Expand full source code Collapse full source code View on Trac