[wp-trac] [WordPress Trac] #14955: Themes should support uninstall.php or uninstall hook

WordPress Trac noreply at wordpress.org
Tue Oct 15 21:31:45 UTC 2019


#14955: Themes should support uninstall.php or uninstall hook
------------------------------------+---------------------
 Reporter:  WraithKenny             |       Owner:  (none)
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:
Component:  Themes                  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+---------------------

Comment (by pbiron):

 [https://core.trac.wordpress.org/attachment/ticket/14955/14955.2.diff
 14955.2.diff] adds the `delete_theme` actions before the deletion attempt
 and the `deleted_theme` action after the deletion attempt.

 I think #37951 should be opened back up as it is more appropriate to these
 hooks (since this ticket was originally intended for theme `uninstall`
 hooks), but since @vetyst was encouraged to add his similar patch to this
 ticket I did as well.

 My use case is simple: I've got a plugin that modifies the database when
 themes are installed (which it detects by hooking into
 [https://developer.wordpress.org/reference/hooks/upgrader_process_complete/
 upgrader_process_complete] and I need it to cleanup after itself when
 themes are deleted.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/14955#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list