page_row_actions
云策文档标注
概述
page_row_actions 是一个 WordPress 过滤器,用于修改页面列表表格中的行操作链接数组。此过滤器仅对分层文章类型(如页面)生效。
关键要点
- 过滤器名称:page_row_actions
- 作用对象:页面列表表格中的行操作链接数组
- 适用条件:仅用于分层文章类型(如页面)
- 参数:$actions(操作链接数组,默认包括编辑、快速编辑、恢复、移至回收站、永久删除、预览和查看等)和 $post(文章对象)
- 引入版本:WordPress 2.8.0
代码示例
$actions = apply_filters( 'page_row_actions', $actions, $post );注意事项
此过滤器在 WP_Posts_List_Table::handle_row_actions() 方法中使用,用于生成和显示行操作链接。
原文内容
Filters the array of row action links on the Pages list table.
Description
The filter is evaluated only for hierarchical post types.
Parameters
$actionsstring[]-
An array of row action links. Defaults are
'Edit', ‘Quick Edit’,'Restore','Trash', ‘Delete Permanently’,'Preview', and'View'. $postWP_Post-
The post object.
Source
$actions = apply_filters( 'page_row_actions', $actions, $post );
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |