the_excerpt_export
云策文档标注
概述
the_excerpt_export 是一个 WordPress 过滤器钩子,用于在生成 WXR 导出文件时过滤文章摘要。它允许开发者在导出过程中修改或处理摘要内容。
关键要点
- 过滤器名称:the_excerpt_export
- 用途:过滤用于 WXR 导出的文章摘要
- 参数:$post_excerpt(字符串),表示当前文章的摘要
- 相关函数:export_wp(),位于 wp-admin/includes/export.php,用于生成 WXR 导出文件
- 引入版本:WordPress 2.6.0
代码示例
$excerpt = wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
原文内容
Filters the post excerpt used for WXR exports.
Parameters
$post_excerptstring-
Excerpt for the current post.
Source
$excerpt = wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |