wp_embed_excerpt_attachment

函数


wp_embed_excerpt_attachment ( $content )
参数
  • (string)
    $content
    The current post excerpt.
    Required:
返回值
  • (string) The modified post excerpt.
定义位置
  • wp-includes/embed.php
    , line 1030
引入
4.4.0
弃用

Filters the post excerpt for the embed template.

Shows players for video and audio attachments.

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

	return $content;
}