On this page
wp_plugin_update_rows()
Adds a callback to display update information for plugins with updates available.
Source
File: wp-admin/includes/update.php. View all references
function wp_plugin_update_rows() {
if ( ! current_user_can( 'update_plugins' ) ) {
return;
}
$plugins = get_site_transient( 'update_plugins' );
if ( isset( $plugins->response ) && is_array( $plugins->response ) ) {
$plugins = array_keys( $plugins->response );
foreach ( $plugins as $plugin_file ) {
add_action( "after_plugin_row_{$plugin_file}", 'wp_plugin_update_row', 10, 2 );
}
}
}
Related
Uses
| Uses | Description |
|---|---|
| get_site_transient() wp-includes/option.php | Retrieves the value of a site transient. |
| current_user_can() wp-includes/capabilities.php | Returns whether the current user has the specified capability. |
| add_action() wp-includes/plugin.php | Adds a callback function to an action hook. |
Used By
| Used By | Description |
|---|---|
| wp_ajax_search_plugins() wp-admin/includes/ajax-actions.php | Ajax handler for searching plugins. |
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_plugin_update_rows