
如何创建一个有效的WordPress开发流程
wp_embed_excerpt_attachment ( $content )
wp_embed_extract_attachment:当附件嵌入到文章或页面中时,此函数会为附件生成摘录。它将附件ID作为参数,并返回附件的HTML摘录。
过滤嵌入模板的文章摘录。
显示视频和音频附件的播放器。
function wp_embed_excerpt_attachment( $content ) { if ( is_attachment() ) { return prepend_attachment( '' ); } return $content; }