prepend_attachment
云策文档标注
概述
prepend_attachment 是一个 WordPress 过滤器钩子,用于在文章内容前添加附件标记。它允许开发者自定义附件在内容中的前置显示方式。
关键要点
- 过滤器钩子名称:prepend_attachment
- 主要功能:过滤附件 HTML 输出,以在文章内容前添加
- 相关函数:prepend_attachment() 用于将附件包装在段落标签中
- 引入版本:WordPress 2.0.0
代码示例
$p = apply_filters( 'prepend_attachment', $p );
原文内容
Filters the attachment markup to be prepended to the post content.
Description
See also
Parameters
$pstring-
The attachment HTML output.
Source
$p = apply_filters( 'prepend_attachment', $p );
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |