Plugins: In uninstall_plugin() pass the plugin file to wp_register_plugin_realpath().

`wp_register_plugin_realpath()` calls `dirname( $file );` to remove the basename. The basename must be included in the argument or the symlinked directory won't be registered.

Props andy.
Fixes #36709.

git-svn-id: https://develop.svn.wordpress.org/trunk@37331 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-04-30 15:03:14 +00:00
parent ee30b90714
commit c39a438d65

View File

@ -1003,7 +1003,7 @@ function uninstall_plugin($plugin) {
unset($uninstallable_plugins);
define('WP_UNINSTALL_PLUGIN', $file);
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . dirname( $file ) );
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
include( WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php' );
return true;