[wp-trac] [WordPress Trac] #40821: Add filter to `wpmu_delete_blog()` to overwrite ability to drop tables

WordPress Trac noreply at wordpress.org
Fri May 19 20:26:22 UTC 2017


#40821: Add filter to `wpmu_delete_blog()` to overwrite ability to drop tables
--------------------------------+-----------------------------
 Reporter:  mermel              |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Future Release
Component:  Networks and Sites  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  multisite
--------------------------------+-----------------------------
Changes (by jeremyfelt):

 * milestone:  Awaiting Review => Future Release


Comment:

 Replying to [comment:2 flixos90]:
 > I'm curious about a use-case for this. When would you want to deny
 dropping tables even though it is set? I'm not opposed to the filter, but
 would like to get some background.

 We use the current `wpmu_drop_tables` filter so that site's tables are
 retained in the DB even when the site's record is deleted from `wp_blogs`.
 This is partially because the `DB_USER` does not have the capability to
 `DROP TABLES` and any attempt creates an unnecessary error log. It also
 makes data retention easier.

 There's a good chance that I would also make use of a short circuit filter
 to avoid deleting uploads as well.

 I agree that we can go with current naming. I'd also want this named to
 convey that more than the tables are being dropped/not dropped.

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


More information about the wp-trac mailing list