network_admin_plugin_action_links_<plugin_file>

Filters the list of action links displayed for a specific plugin in the Network Admin Plugins list table.

Description

apply_filters( 'network_admin_plugin_action_links_<plugin_file>', (array) $actions, (string) $plugin_file, (array) $plugin_data, (string) $context ); 

The dynamic portion(s) of the hook name refer to the path to the plugin file, relative to the plugins directory.

Parameters (4)

0. $actions (array)
An array of plugin action links.
1. $plugin_file (string)
Path to the plugin file relative to the plugins directory.
2. $plugin_data (array)
An array of plugin data.
3. $context (string)
The plugin context. Defaults are All,, Active., Inactive, Recently Activated, Upgrade, Must-Use, Drop-ins, Search.

Usage

To run the hook, copy the example below.
  1. $actions = apply_filters( 'network_admin_plugin_action_links_{$plugin_file}', $actions, $plugin_file, $plugin_data, $context ); 
  2.  
  3. if ( !empty( $actions ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the network_admin_plugin_action_links_<plugin_file> callback 
  2. function filter_network_admin_plugin_action_links_plugin_file( $actions, $plugin_file, $plugin_data, $context ) { 
  3. // make filter magic happen here... 
  4. return $actions
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "network_admin_plugin_action_links_{$plugin_file}", 'filter_network_admin_plugin_action_links_plugin_file', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "network_admin_plugin_action_links_{$plugin_file}", 'filter_network_admin_plugin_action_links_plugin_file', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-plugins-list-table.php  
  1. $actions = apply_filters( "network_admin_plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );