钩子文档

the_excerpt_embed

💡 云策文档标注

概述

the_excerpt_embed 是一个 WordPress 过滤器钩子,用于在嵌入模板中过滤文章摘要。它允许开发者修改或自定义嵌入内容中的摘要输出。

关键要点

  • 过滤器钩子:the_excerpt_embed,用于处理嵌入模板中的文章摘要。
  • 参数:接受一个字符串参数 $output,表示当前的文章摘要。
  • 用途:主要用于嵌入模板,如通过 oEmbed 或嵌入功能显示内容时。
  • 相关函数:the_excerpt_embed() 函数用于显示嵌入模板中的文章摘要。
  • 引入版本:WordPress 4.4.0 中首次引入。

📄 原文内容

Filters the post excerpt for the embed template.

Parameters

$outputstring
The current post excerpt.

Source

echo apply_filters( 'the_excerpt_embed', $output );

Changelog

Version Description
4.4.0 Introduced.