Make WordPress Core

Changeset 32570


Ignore:
Timestamp:
05/24/2015 08:04:55 AM (10 years ago)
Author:
dd32
Message:

Shiny Updates: Handle the case where the plugin is installed into a different directory than it previously existed in.
A good example of this is when the plugin being updated is currently installed as 'Plugin-Name' but the canonical directory is 'plugin-name', but it can also occur when the plugin is installed in 'super-cool-plugin' and it's canonical name is 'average-plugin'.

Fixes #32465 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r32330 r32570  
    29032903        'newVersion' => '',
    29042904    );
     2905
    29052906    $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
    29062907    if ( $plugin_data['Version'] ) {
     
    29402941        }
    29412942
    2942         $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
     2943        $plugin_data = get_plugins( '/' . $result[ $plugin ]['destination_name'] );
     2944        $plugin_data = reset( $plugin_data );
    29432945
    29442946        if ( $plugin_data['Version'] ) {
Note: See TracChangeset for help on using the changeset viewer.