post_format_rewrite_base
云策文档标注
概述
post_format_rewrite_base 是一个 WordPress 过滤器,用于修改文章格式的重写基础字符串。它允许开发者自定义文章格式 URL 中的基础部分,默认值为 'type'。
关键要点
- 过滤器名称:post_format_rewrite_base
- 参数:$context(字符串),表示重写基础的上下文,默认值为 'type'
- 用途:在创建初始分类法时,通过 apply_filters 调用,影响文章格式的 URL 结构
- 相关函数:create_initial_taxonomies(),位于 wp-includes/taxonomy.php 文件中
- 引入版本:WordPress 3.1.0
原文内容
Filters the post formats rewrite base.
Parameters
$contextstring-
Context of the rewrite base. Default
'type'.
Source
$post_format_base = apply_filters( 'post_format_rewrite_base', 'type' );
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |