post_parent ) && $image->post_parent != $id )
$url .= '#main';
return $url;
}
add_filter( 'attachment_link', 'motif_enhanced_image_navigation', 10, 2 );
/**
* Disables the sharing buttons on cases where it's not needed.
*/
function motif_sharing_show( $show ) {
if ( ! is_singular( 'jetpack-testimonial' ) && 'jetpack-testimonial' === get_post_type() ) {
$show = false;
}
return $show;
}
add_filter( 'sharing_show', 'motif_sharing_show', 99 );
/**
* Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
* @return string 'Continue reading' link prepended with an ellipsis.
*/
if ( ! function_exists( 'motif_excerpt_more' ) ) :
function motif_excerpt_more( $more ) {
$link = sprintf( '%2$s',
esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Name of current post */
sprintf( esc_html__( 'Continue reading %s', 'motif' ), '' . get_the_title( get_the_ID() ) . '' )
);
return ' … ' . $link;
}
add_filter( 'excerpt_more', 'motif_excerpt_more' );
endif;