Skip to content

Commit

Permalink
escaping URL, checking for frontend, and localizing the (more...) button
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Oct 23, 2018
1 parent 01ceaae commit 281e498
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ function memberlite_getPostThumbnailWidth( $post_id = null ) {
*/
function memberlite_excerpt_more( $more ) {
global $post;
return ' <a href="' . get_permalink( $post->ID ) . '" rel="nofollow">(more...)</a></p>';

if ( ! is_admin() ) {
$more = ' <a href="' . esc_url( get_permalink( $post->ID ) ) . '" rel="nofollow">' . esc_html( __( '(more...)', 'memberlite' ) ) . '</a>';
}

return $more;
}
add_filter( 'excerpt_more', 'memberlite_excerpt_more' );

Expand Down

0 comments on commit 281e498

Please sign in to comment.