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.
Built from https://develop.svn.wordpress.org/trunk@37331


git-svn-id: http://core.svn.wordpress.org/trunk@37297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-04-30 15:04:27 +00:00
parent 93c8cdbaed
commit 697a6d5560
2 changed files with 2 additions and 2 deletions

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;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37330';
$wp_version = '4.6-alpha-37331';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.