Make WordPress Core

Changeset 33301 for branches/4.2


Ignore:
Timestamp:
07/17/2015 03:54:21 AM (11 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'.

Merges [32570] to the 4.2 branch.
Fixes #32465

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

  • branches/4.2/src/wp-admin/includes/ajax-actions.php

    r33258 r33301  
    28932893                'newVersion' => '',
    28942894        );
     2895
    28952896        $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
    28962897        if ( $plugin_data['Version'] ) {
    … …  
    29272928                }
    29282929
    2929                 $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
     2930                $plugin_data = get_plugins( '/' . $result[ $plugin ]['destination_name'] );
     2931                $plugin_data = reset( $plugin_data );
    29302932
    29312933                if ( $plugin_data['Version'] ) {
Note: See TracChangeset for help on using the changeset viewer.