Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.7861 |
Changes | 0 |
1 | <?php |
||
32 | 7 | protected function migrateDatabase() |
|
33 | { |
||
34 | 7 | require_once ABSPATH.'/wp-admin/includes/plugin.php'; |
|
35 | 7 | if (!is_plugin_active_for_network(plugin_basename(glsr()->file))) { |
|
36 | 7 | $this->fixDatabaseVersion(); |
|
37 | 7 | return; |
|
38 | } |
||
39 | $sites = get_sites([ |
||
40 | 'fields' => 'ids', |
||
41 | 'network_id' => get_current_network_id(), |
||
42 | ]); |
||
43 | foreach ($sites as $siteId) { |
||
44 | switch_to_blog($siteId); |
||
45 | $this->fixDatabaseVersion(); |
||
46 | restore_current_blog(); |
||
47 | } |
||
50 |