From c39a438d6588a2c1e425b11e747efdfdaacff511 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sat, 30 Apr 2016 15:03:14 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 25f6828787..5178c9b60c 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -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;