wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_embed_excerpt_attachment › WordPress Function

Since4.4.0
Deprecatedn/a
wp_embed_excerpt_attachment ( $content )
Parameters:
  • (string) $content The current post excerpt.
    Required: Yes
Returns:
  • (string) The modified post excerpt.
Defined at:
Codex:

Filters the post excerpt for the embed template.

Shows players for video and audio attachments.


Source

function wp_embed_excerpt_attachment( $content ) {
	if ( is_attachment() ) {
		return prepend_attachment( '' );
	}

	return $content;
}