wp_embed_excerpt_more() WordPress Function

This function allows you to change the default excerpt more text. By default, this is set to [...] but can be changed to something else.

wp_embed_excerpt_more( string $more_string ) #

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


Description

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


Top ↑

Parameters

$more_string

(string)(Required)Default 'more' string.


Top ↑

Return

(string) 'Continue reading' link prepended with an ellipsis.


Top ↑

Source

File: wp-includes/embed.php

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;
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.