钩子文档

manage_posts_extra_tablenav

💡 云策文档标注

概述

manage_posts_extra_tablenav 是一个 WordPress 动作钩子,用于在文章列表表格的导航栏中“actions” div 关闭后触发,允许开发者添加自定义内容。

关键要点

  • 这是一个动作钩子,在文章列表表格的导航栏中“actions” div 关闭后立即触发。
  • 参数 $which 指定额外导航标记的位置,可以是 'top' 或 'bottom'。
  • 钩子通过 do_action( 'manage_posts_extra_tablenav', $which ) 调用。
  • 首次引入于 WordPress 4.4.0 版本。

代码示例

do_action( 'manage_posts_extra_tablenav', $which );

注意事项

  • 钩子主要用于扩展文章列表表格的导航栏功能,例如添加自定义按钮或筛选器。
  • 确保在正确的位置使用钩子,以避免干扰默认的 WordPress 界面。

📄 原文内容

Fires immediately following the closing “actions” div in the tablenav for the posts list table.

Parameters

$whichstring
The location of the extra table nav markup: 'top' or 'bottom'.

Source

do_action( 'manage_posts_extra_tablenav', $which );

Changelog

Version Description
4.4.0 Introduced.