wp_embed_excerpt_attachment

函数
wp_embed_excerpt_attachment ( $content )
参数
  • (string) $content The current post excerpt.
    Required:
返回值
  • (string) The modified post excerpt.
定义位置
相关方法
wp_embed_excerpt_morewp_delete_attachmentwp_insert_attachmentwp_maybe_generate_attachment_metadatawp_ajax_get_attachment
引入
4.4.0
弃用
-

wp_embed_extract_attachment:当附件嵌入到文章或页面中时,此函数会为附件生成摘录。它将附件ID作为参数,并返回附件的HTML摘录。

过滤嵌入模板的文章摘录。

显示视频和音频附件的播放器。

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

	return $content;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 15:32:55

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: