On this page
wp_embed_excerpt_attachment( string $content ): string
Filters the post excerpt for the embed template.
Description
Shows players for video and audio attachments.
Parameters
$contentstring Required-
The current post excerpt.
Return
string The modified post excerpt.
Source
File: wp-includes/embed.php. View all references
function wp_embed_excerpt_attachment( $content ) {
if ( is_attachment() ) {
return prepend_attachment( '' );
}
return $content;
}
Related
Uses
| Uses | Description |
|---|---|
| is_attachment() wp-includes/query.php | Determines whether the query is for an existing attachment page. |
| prepend_attachment() wp-includes/post-template.php | Wraps attachment in paragraph tag before content. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_embed_excerpt_attachment