wp-sweep
Last commit date
js
9 years ago
admin.php
9 years ago
class-command.php
9 years ago
composer.json
10 years ago
index.php
9 years ago
readme.txt
9 years ago
uninstall.php
9 years ago
wp-sweep.php
9 years ago
uninstall.php
35 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Uninstall WP-Sweep |
| 4 | */ |
| 5 | if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 6 | exit; |
| 7 | } |
| 8 | |
| 9 | |
| 10 | |
| 11 | if ( is_multisite() ) { |
| 12 | $ms_sites = function_exists( 'get_sites' ) ? get_sites() : wp_get_sites(); |
| 13 | |
| 14 | if ( 0 < sizeof( $ms_sites ) ) { |
| 15 | foreach ( $ms_sites as $ms_site ) { |
| 16 | $blog_id = class_exists( 'WP_Site' ) ? $ms_site->blog_id : $ms_site['blog_id']; |
| 17 | switch_to_blog( $blog_id ); |
| 18 | plugin_uninstalled(); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | restore_current_blog(); |
| 23 | } else { |
| 24 | plugin_uninstalled(); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Delete plugin table when uninstalled |
| 29 | * |
| 30 | * @access public |
| 31 | * @return void |
| 32 | */ |
| 33 | function plugin_uninstalled() { |
| 34 | } |
| 35 |