wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_embed_excerpt_more › WordPress Function

Since4.4.0
已弃用n/a
wp_embed_excerpt_more ( $more_string )
参数:
  • (string) $more_string Default 'more' string.
    Required: Yes
返回:
  • (string) 'Continue reading' link prepended with an ellipsis.
定义在:
文档:

Filters the string in the 'more' link displayed after a trimmed excerpt.

Replaces '[...]' (appended to automatically generated excerpts) with an ellipsis and a "Continue reading" link in the embed template.


源码

function wp_embed_excerpt_more( $more_string ) {
	if ( ! is_embed() ) {
		return $more_string;
	}

	$link = sprintf(
		'<a href="%1$s" class="wp-embed-more" target="_top">%2$s</a>',
		esc_url( get_permalink() ),
		/* translators: %s: Post title. */
		sprintf( __( 'Continue reading %s' ), '<span class="screen-reader-text">' . get_the_title() . '</span>' )
	);
	return ' &hellip; ' . $link;
}