wp_terms_checklist_args
云策文档标注
概述
wp_terms_checklist_args 是一个 WordPress 过滤器钩子,用于修改分类法术语复选框列表的参数。它允许开发者在生成术语复选框时自定义参数,如 Walker 类。
关键要点
- 过滤器钩子:wp_terms_checklist_args
- 用途:过滤分类法术语复选框列表的参数,例如用于自定义输出或 Walker 类
- 参数:$args(数组或字符串,参数列表)和 $post_id(整数,文章 ID)
- 相关函数:与 wp_terms_checklist() 关联,该函数输出带术语名称的复选框列表
- 注意事项:自 WordPress 5.0.0 起,此钩子在块编辑器中对自定义 Walker 类可能无效,可能已过时
原文内容
Filters the taxonomy terms checklist arguments.
Description
See also
Parameters
$argsarray|string-
An array or string of arguments.
$post_idint-
The post ID.
Source
$params = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
Changelog
| Version | Description |
|---|---|
| 3.4.0 | Introduced. |
Skip to note 2 content
Corey Salzano
This hook seems to have been obsoleted by WordPress 5.0.0. Using this hook to provide a custom Walker class has no effect on the output of a list of term checkboxes in the block editor.