Make WordPress Core


Ignore:
Timestamp:
01/08/2016 05:47:18 PM (9 years ago)
Author:
obenland
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r36092 r36221  
    652652            case 'update_available':
    653653                if ( $status['url'] ) {
    654                     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>';
     654                    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>';
    655655                }
    656656                break;
Note: See TracChangeset for help on using the changeset viewer.