Plugins: Use plugin file rather than slug as identifier

The plugin file is unique while there can be more than one plugin with the
same slug. This also allows us to simplify the way updates from the plugin
detail iframe are executed.

See [36205].
Fixes #35350.



git-svn-id: https://develop.svn.wordpress.org/trunk@36221 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland
2016-01-08 17:47:18 +00:00
parent 9fc247408c
commit e4b8679d17
2 changed files with 21 additions and 23 deletions

View File

@@ -651,7 +651,7 @@ function install_plugin_information() {
break;
case 'update_available':
if ( $status['url'] ) {
echo '<a data-slug="' . esc_attr( $api->slug ) . '" id="plugin_update_from_iframe" class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) .'</a>';
echo '<a data-slug="' . esc_attr( $api->slug ) . '" data-plugin="' . esc_attr( $status['file'] ) . '" id="plugin_update_from_iframe" class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) .'</a>';
}
break;
case 'newer_installed':