mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user