{$taxonomy}_{$field}_rss
云策文档标注
概述
此文档介绍了一个用于在 RSS 中过滤分类法字段的 WordPress Hook。Hook 名称由分类法 slug 和字段名动态组成,允许开发者自定义字段值。
关键要点
- Hook 名称格式为 {$taxonomy}_{$field}_rss,其中 $taxonomy 是分类法 slug,$field 是字段名。
- 参数 $value 是分类法字段的当前值,可通过此 Hook 进行修改。
- 此 Hook 在 WordPress 2.3.0 版本中引入,常用于 sanitize_term_field() 函数中。
代码示例
$value = apply_filters( "{$taxonomy}_{$field}_rss", $value );
原文内容
Filters the taxonomy field for use in RSS.
Description
The dynamic portions of the hook name, $taxonomy, and $field, refer to the taxonomy slug and field name, respectively.
Parameters
$valuemixed-
Value of the taxonomy field.
Source
$value = apply_filters( "{$taxonomy}_{$field}_rss", $value );
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |