plugin_action_links

过滤钩子
apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context )
参数
  • (string[]) $actions An array of plugin action links. By default this can include 'activate', 'deactivate', and 'delete'. With Multisite active this can also include 'network_active' and 'network_only' items.
    Required:
  • (string) $plugin_file Path to the plugin file relative to the plugins directory.
    Required:
  • (array) $plugin_data An array of plugin data. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values.
    Required:
  • (string) $context The plugin context. By default this can include 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
    Required:
定义位置
相关勾子
plugin_install_action_linkspaginate_linksnetwork_admin_plugin_action_linksplugin_action_links_plugin_filetheme_action_links
相关方法
paginate_linkspaginate_comments_linksis_plugin_activeplugin_dir_urlis_plugin_active_for_networkplugins_api
引入
4.9.0
弃用
-

plugin_action_links 是一个过滤钩子,允许开发者在WordPress管理区的”插件”屏幕上的”行动”栏中添加链接。这个钩子可以用来给每个插件添加自定义的链接,比如设置页面或支持资源的链接。

过滤显示在插件列表表中的每个插件的动作链接。

$actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );

常见问题

FAQs
查看更多 >