[wp-trac] [WordPress Trac] #13786: Problems with the current register_uninstall_hook implementation

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 8 19:23:25 UTC 2010


#13786: Problems with the current register_uninstall_hook implementation
--------------------------+-------------------------------------------------
 Reporter:  x3r0ss        |       Owner:  westi         
     Type:  defect (bug)  |      Status:  new           
 Priority:  normal        |   Milestone:  Unassigned    
Component:  Plugins       |     Version:  3.0           
 Severity:  normal        |    Keywords:  hooks, plugins
--------------------------+-------------------------------------------------

Comment(by jacobsantos):

 Replying to [comment:13 x3r0ss]:
 > What I did was
 > {{{
 >  register_uninstall_hook(__FILE__, array($this, "uninstall"));
 > }}}


 This is because the callback is serialized when it is put into !WordPress
 and therefore will also include the class defined in $this. Again, as it
 was stated in the last ticket, the object callback can be used, but must
 be a static method or a function. The only unsupported callback is that
 which you are using above.

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


More information about the wp-trac mailing list