diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php
index e5e5288..5db957d 100644
|
a
|
b
|
function register_deactivation_hook($file, $function) {
|
| 784 | 784 | * should always check for the 'WP_UNINSTALL_PLUGIN' constant, before |
| 785 | 785 | * executing. |
| 786 | 786 | * |
| | 787 | * The registration updates wp_options and so should only be called within an |
| | 788 | * activation hook. |
| | 789 | * |
| 787 | 790 | * @since 2.7.0 |
| 788 | 791 | * |
| 789 | 792 | * @param string $file Plugin file. |
| … |
… |
function register_uninstall_hook( $file, $callback ) {
|
| 802 | 805 | * uninstalling the plugin. |
| 803 | 806 | */ |
| 804 | 807 | $uninstallable_plugins = (array) get_option('uninstall_plugins'); |
| 805 | | $uninstallable_plugins[plugin_basename($file)] = $callback; |
| 806 | | |
| 807 | | update_option('uninstall_plugins', $uninstallable_plugins); |
| | 808 | $key = plugin_basename($file); |
| | 809 | if ( empty( $uninstallable_plugins[$key] ) || $uninstallable_plugins[$key] != $callback) { |
| | 810 | $uninstallable_plugins[$key] = $callback; |
| | 811 | update_option('uninstall_plugins', $uninstallable_plugins); |
| | 812 | } |
| 808 | 813 | } |
| 809 | 814 | |
| 810 | 815 | /** |