plugin_action_links_{$plugin_file}

过滤钩子
apply_filters( "plugin_action_links_{$plugin_file}", $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:
定义位置
相关勾子
network_admin_plugin_action_links_plugin_fileplugin_action_linksplugin_install_action_linksafter_plugin_row_plugin_filenetwork_admin_plugin_action_links
相关方法
get_plugin_fileswp_make_plugin_file_treewp_print_plugin_file_treewp_get_active_network_pluginswp_edit_theme_plugin_filewp_ajax_edit_theme_plugin_file
引入
4.9.0
弃用
-

plugin_action_links_{$plugin_file}是”plugin_action_links”钩子的一个变种,专门针对单个插件。钩子名称中的”{$plugin_file}”部分被替换为插件的文件名。这个钩子可以用来为特定的插件在”行动”栏中添加自定义链接。

过滤插件列表表中为特定插件显示的操作链接列表。

$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );

常见问题

FAQs
查看更多 >