plugin_action_links Filter Hook Deprecated?

http://adambrown.info/p/wp_hooks/hook/plugin_action_links_%7B$plugin_file%7D

Says the hook is deprecated. However, the {$prefix}plugin_action_hook_{$plugin_file} is not. I poked around the wp-admin/includes/class-wp-plugins-list-table.php file for the hook, and found this:

Read More
$actions = apply_filters( $prefix . "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context );

$prefix is defined a few lines above:

$prefix = $screen->is_network ? 'network_admin_' : '';

Since I was able to get my add_filter call to plugin_actions_row_{$plugin_file} to work, I’m assuming the filter hook is still there. Well, sort of: the filter is still available as it’s not a network admin screen. Correct? And one could use…

add_filter( 'network_admin_plugin_action_links_{$plugin_file}', 'do_something' )

…to put a link into the network’s plugin screen?

Related posts

Leave a Reply

2 comments

  1. Yes, both should work as expected:

    "plugin_action_links_{$plugin_file}"

    "network_admin_plugin_action_links_{$plugin_file}"

    Note that I’m using " instead of '.

    PS: The term is deprecated, not depreciated.