pre_current_active_plugins
云策文档标注
概述
pre_current_active_plugins 是一个 WordPress 动作钩子,在插件列表表格渲染前触发。它适用于所有已安装插件,而不仅仅是活动插件视图。
关键要点
- 触发时机:在插件列表表格渲染之前执行。
- 适用范围:适用于所有已安装插件,包括网络管理后台的插件列表。
- 参数:$plugins_allarray[],一个包含所有已安装插件信息的数组。
- 版本历史:从 WordPress 3.0.0 版本引入。
代码示例
do_action( 'pre_current_active_plugins', $plugins['all'] );注意事项
钩子名称中的 'active' 部分不指代当前视图是否为活动插件,而是指所有已安装的插件。
原文内容
Fires before the plugins list table is rendered.
Description
This hook also fires before the plugins list table is rendered in the Network Admin.
Please note: The ‘active’ portion of the hook name does not refer to whether the current view is for active plugins, but rather all plugins actively-installed.
Parameters
$plugins_allarray[]-
An array of arrays containing information on all installed plugins.
Source
do_action( 'pre_current_active_plugins', $plugins['all'] );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |