{$taxonomy}_row_actions
云策文档标注
概述
此过滤器用于修改在术语列表表格中每个术语显示的操作链接。动态钩子名称基于分类法slug,允许开发者自定义操作链接数组。
关键要点
- 钩子名称动态部分为$taxonomy,例如category_row_actions或post_tag_row_actions。
- 参数包括$actions(操作链接数组,默认包含'Edit'、'Quick Edit'、'Delete'和'View')和$tag(WP_Term对象)。
- 在WP_Terms_List_Table::handle_row_actions()中使用,用于生成和显示行操作链接。
- 自WordPress 3.0.0版本引入。
代码示例
$actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
原文内容
Filters the action links displayed for each term in the terms list table.
Description
The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
Possible hook names include:
category_row_actionspost_tag_row_actions
Parameters
$actionsstring[]-
An array of action links to be displayed. Default
'Edit', ‘Quick Edit’,'Delete', and'View'. $tagWP_Term-
Term object.
Source
$actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |