1. 首页
  2. WordPress 函数手册

delete_plugins()

delete_plugins( string[] $plugins, string $deprecated =  )

为插件列表移除插件的目录和文件。
Remove directory and files of a plugin for a list of plugins.

目录锚点:#参数#返回#源码


参数(Parameters)

参数 类型 必填 说明
$plugins (string[]) 必需 要删除的插件路径列表,相对于插件目录。
$deprecated (string) 可选 不使用。

返回(Return)

(bool|null|WP_Error)成功时为True,如果$plugins为空则为false,失败时为WP|Error。如果需要文件系统凭据才能继续,则为空。


源码(Source)


更新版本 源码位置 使用 被使用
2.6.0 wp-admin/includes/plugin.php:890 1 function 15

delete_plugins() 为WP2原创文章,链接:https://www.wp2.cn/functions/delete_plugins/