delete_plugin
云策文档标注
概述
delete_plugin 是一个 WordPress Hook,在尝试删除插件之前立即触发,用于执行相关操作。
关键要点
- Hook 名称:delete_plugin
- 触发时机:插件删除尝试之前
- 参数:$plugin_file(插件文件相对于 plugins 目录的路径)
- 相关函数:delete_plugins() 用于移除插件目录和文件
- 引入版本:4.4.0
原文内容
Fires immediately before a plugin deletion attempt.
Parameters
$plugin_filestring-
Path to the plugin file relative to the plugins directory.
Source
do_action( 'delete_plugin', $plugin_file );
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |