We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab08abd commit e0ad3d8Copy full SHA for e0ad3d8
uninstall.php
@@ -11,4 +11,34 @@
11
exit;
12
}
13
14
-delete_option( 'perflab_modules_settings' );
+if ( is_multisite() ) {
15
+ delete_data_multisite();
16
+} else {
17
+ delete_data();
18
+}
19
+
20
+/**
21
+ * Delete data for the current blog.
22
+ */
23
+function delete_data() {
24
25
+ delete_option( 'perflab_modules_settings' );
26
27
28
29
+ * Delete data for multisite blogs.
30
31
+function delete_data_multisite() {
32
+ global $wpdb;
33
34
+ $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
35
+ $original_blog_id = get_current_blog_id();
36
37
+ foreach ( $blog_ids as $current_blog_id ) {
38
+ switch_to_blog( $current_blog_id );
39
40
41
+ }
42
43
+ switch_to_blog( $original_blog_id );
44
0 commit comments