diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 22ead3632b..4dbab7412a 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -840,10 +840,12 @@ function register_uninstall_hook( $file, $callback ) { * cases. Emphasis should be put on using the 'uninstall.php' way of * uninstalling the plugin. */ - $uninstallable_plugins = (array) get_option( 'uninstall_plugins' ); - $uninstallable_plugins[ plugin_basename( $file ) ] = $callback; - - update_option( 'uninstall_plugins', $uninstallable_plugins ); + $uninstallable_plugins = (array) get_option( 'uninstall_plugins' ); + $plugin_basename = plugin_basename( $file ); + if ( ! isset( $uninstallable_plugins[ $plugin_basename ] ) || $uninstallable_plugins[ $plugin_basename ] !== $callback ) { + $uninstallable_plugins[ $plugin_basename ] = $callback; + update_option( 'uninstall_plugins', $uninstallable_plugins ); + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index d495481bf5..552e24e91e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-beta1-46332'; +$wp_version = '5.3-beta1-46333'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.