mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
parent
f6917437fc
commit
2c29f1ca04
1 changed files with 18 additions and 15 deletions
|
@ -13,8 +13,11 @@
|
||||||
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (is_multisite()) {
|
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
|
||||||
$blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
|
$blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
|
||||||
/* @TODO: delete all transient, options and files you may have added
|
/* @TODO: delete all transient, options and files you may have added
|
||||||
delete_transient( 'TRANSIENT_NAME' );
|
delete_transient( 'TRANSIENT_NAME' );
|
||||||
|
@ -30,6 +33,7 @@ if (is_multisite()) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if ( $blogs ) {
|
if ( $blogs ) {
|
||||||
|
|
||||||
foreach ( $blogs as $blog ) {
|
foreach ( $blogs as $blog ) {
|
||||||
switch_to_blog( $blog['blog_id'] );
|
switch_to_blog( $blog['blog_id'] );
|
||||||
/* @TODO: delete all transient, options and files you may have added
|
/* @TODO: delete all transient, options and files you may have added
|
||||||
|
@ -51,9 +55,8 @@ if (is_multisite()) {
|
||||||
restore_current_blog();
|
restore_current_blog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
/* @TODO: delete all transient, options and files you may have added
|
/* @TODO: delete all transient, options and files you may have added
|
||||||
delete_transient( 'TRANSIENT_NAME' );
|
delete_transient( 'TRANSIENT_NAME' );
|
||||||
delete_option('OPTION_NAME');
|
delete_option('OPTION_NAME');
|
||||||
|
|
Loading…
Reference in a new issue