[wp-trac] [WordPress Trac] #12754: register_uninstall_hook() doesn't allow multiple callbacks

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 29 05:19:41 UTC 2010


#12754: register_uninstall_hook() doesn't allow multiple callbacks
--------------------------+-------------------------------------------------
 Reporter:  scribu        |       Owner:  westi
     Type:  defect (bug)  |      Status:  new  
 Priority:  normal        |   Milestone:  3.0  
Component:  Plugins       |     Version:  3.0  
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------
Changes (by nacin):

  * keywords:  has-patch =>


Comment:

 This wouldn't work when the plugin is deactivated at the time of the
 uninstallation.

 If we are to support multiple uninstall hooks, we would need to store
 multiple callbacks as an array, i.e.
 {{{$uninstallable_plugins[plugin_basename($file)][] = $callback;}}}, then
 loop through those to add the callbacks to the action.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12754#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list