diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index f2b2a9a..d132ac1 100644
|
a
|
b
|
|
| 816 | 816 | uninstall_plugin($plugin_file); |
| 817 | 817 | } |
| 818 | 818 | |
| | 819 | /** |
| | 820 | * Fires immediately before a plugin deletion attempt. |
| | 821 | * |
| | 822 | * @since 4.4.0 |
| | 823 | * |
| | 824 | * @param string $plugin_file Plugin file name. |
| | 825 | */ |
| | 826 | do_action( 'delete_plugin', $plugin_file ); |
| | 827 | |
| 819 | 828 | $this_plugin_dir = trailingslashit( dirname( $plugins_dir . $plugin_file ) ); |
| 820 | 829 | // If plugin is in its own directory, recursively delete the directory. |
| 821 | 830 | if ( strpos( $plugin_file, '/' ) && $this_plugin_dir != $plugins_dir ) { //base check on if plugin includes directory separator AND that it's not the root plugin folder |
| … |
… |
|
| 832 | 841 | * @param string $plugin_file Plugin file name. |
| 833 | 842 | * @param bool $deleted Whether the plugin deletion was successful. |
| 834 | 843 | */ |
| 835 | | do_action( 'delete_plugin', $plugin_file, $deleted ); |
| | 844 | do_action( 'deleted_plugin', $plugin_file, $deleted ); |
| 836 | 845 | |
| 837 | 846 | if ( ! $deleted ) { |
| 838 | 847 | $errors[] = $plugin_file; |