Ensure that we target the correct plugin row for update updates

The DOM traversal of the plugins list table was less than ideal. By switching to data attributes, we can better target the DOM elements we want to update.

Props ericlewis
Fixes #31621



Built from https://develop.svn.wordpress.org/trunk@31831


git-svn-id: http://core.svn.wordpress.org/trunk@31813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin
2015-03-19 05:26:28 +00:00
parent 55fd3fa791
commit a836a32fb4
4 changed files with 20 additions and 15 deletions

View File

@@ -515,7 +515,11 @@ class WP_Plugins_List_Table extends WP_List_Table {
if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) )
$class .= ' update';
echo "<tr id='$id' class='$class'>";
printf( "<tr id='%s' class='%s' data-slug='%s'>",
$id,
$class,
$plugin_data['slug']
);
list( $columns, $hidden ) = $this->get_column_info();