Ticket #31792: 31792.diff
| File 31792.diff, 1.1 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/plugin.php
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. … … 801 804 * cases. Emphasis should be put on using the 'uninstall.php' way of 802 805 * uninstalling the plugin. 803 806 */ 804 $uninstallable_plugins = (array) get_option('uninstall_plugins'); 805 $uninstallable_plugins[plugin_basename($file)] = $callback; 806 807 update_option('uninstall_plugins', $uninstallable_plugins); 807 $uninstallable_plugins = (array) get_option( 'uninstall_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 /**
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)