do_action( "after_plugin_row_{$plugin_file}", string $plugin_file , array $plugin_data , string $status )
Fires after each specific row in the Plugins list table.
Description
The dynamic portion of the hook name, $plugin_file
, refers to the path to the plugin file, relative to the plugins directory.
Parameters
-
$plugin_file
string -
Path to the plugin file relative to the plugins directory.
-
$plugin_data
array -
An array of plugin data. See get_plugin_data() and the 'plugin_row_meta' filter for the list of possible values.
-
$status
string -
Status filter currently applied to the plugin list.
Possible values are:'all'
,'active'
,'inactive'
,'recently_activated'
,'upgrade'
,'mustuse'
,'dropins'
,'search'
,'paused'
,'auto-update-enabled'
,'auto-update-disabled'
.
Source
File: wp-admin/includes/class-wp-plugins-list-table.php
.
View all references
do_action( "after_plugin_row_{$plugin_file}", $plugin_file, $plugin_data, $status );
Changelog
Version | Description |
---|---|
5.5.0 | Added 'auto-update-enabled' and 'auto-update-disabled' to possible values for $status . |
2.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
This an action on which the update link information is hooked. When a plugin is found to have an updated version, an additional row is added after the plugin entry (on the
plugins.php
admin page), enabling a user to view the update details as well as upgrade.Most users simply upgrade and hope for the best without necessarily looking at the details and this hook is a means to add a warning message on the upgrade link for example, asking a user to view the details in case a major code change may affect their setup.
The parameters passed in the filter are,
$plugin_file
– this is a little redundant as the hook already has the file name in it$plugin_data
– an array of plugin attributes which is useful to set some conditions, see below.$status
– if the plugins page is being filtered (for example to show only theactivated
ones), by default it is set toall
.You could compare your currently installed plugin version to the
$plugin_data['new_version']
to determine if you need to show some warning message or something else.