WordPress开发者和主题制作者的搜索引擎



wp_embed_excerpt_attachment ›

Since4.4.0
已弃用n/a
wp_embed_excerpt_attachment ( $content )
参数:
  • (string) $content The current post excerpt.
    Required: Yes
返回:
  • (string) The modified post excerpt.
定义在:
文档:

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