钩子文档

update_plugin_complete_actions

💡 云策文档标注

概述

update_plugin_complete_actions 是一个 WordPress 过滤器钩子,用于在单个插件更新后过滤可用的操作链接列表。它允许开发者自定义或修改这些链接,以增强用户体验或添加特定功能。

关键要点

  • 这是一个过滤器钩子,用于修改插件更新后的操作链接。
  • 接受两个参数:$update_actions(操作链接数组)和 $plugin(插件文件路径)。
  • 在 Plugin_Upgrader_Skin::after() 方法中使用,版本 2.7.0 引入。

📄 原文内容

Filters the list of action links available following a single plugin update.

Parameters

$update_actionsstring[]
Array of plugin action links.
$pluginstring
Path to the plugin file relative to the plugins directory.

Source

$update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin );

Changelog

Version Description
2.7.0 Introduced.