dashboard_secondary_items
云策文档标注
概述
此文档介绍 dashboard_secondary_items 过滤器,用于控制 WordPress 仪表板小部件“WordPress Events and News”中次要链接项目的显示数量。开发者可以通过此过滤器自定义次要 feed 的项目数。
关键要点
- dashboard_secondary_items 是一个过滤器,允许修改次要链接项目的数量。
- 参数 $items 指定次要 feed 中要显示的项目数,默认值为 3。
- 此过滤器在 WordPress 4.4.0 版本中引入,用于 wp_dashboard_primary() 函数。
原文内容
Filters the number of secondary link items for the ‘WordPress Events and News’ dashboard widget.
Parameters
$itemsstring-
How many items to show in the secondary feed.
Source
'items' => apply_filters( 'dashboard_secondary_items', 3 ),
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |