wp_embed_excerpt_attachment() WordPress Function
The wp_embed_excerpt_attachment() function allows you to embed an excerpt of an attachment in a post. This is useful for when you want to display a preview of an attachment, such as an image, in a post.
wp_embed_excerpt_attachment( string $content ) #
Filters the post excerpt for the embed template.
Description
Shows players for video and audio attachments.
Parameters
- $content
(string)(Required)The current post excerpt.
Return
(string) The modified post excerpt.
Source
File: wp-includes/embed.php
function wp_embed_excerpt_attachment( $content ) { if ( is_attachment() ) { return prepend_attachment( '' ); } return $content; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |