← All changes
|
backend/src/Services/InstallActions/ActivationNewSiteMultisite.php
+2
-9
0.9
→
1.5
View file →
| @@ -5,15 +5,10 @@ | ||
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | namespace IvyForms\Services\InstallActions; |
| 8 | 8 | |
| 9 | -// phpcs:disable PSR1.Files.SideEffects | |
| 10 | 9 | use IvyForms\Common\Exceptions\InvalidArgumentException; |
| 11 | 10 | |
| 12 | -if (!defined('ABSPATH')) { | |
| 13 | - exit; // Exit if accessed directly | |
| 14 | -} | |
| 15 | - | |
| 16 | 11 | /** |
| 17 | 12 | * Class ActivationNewSiteMultisite |
| 18 | 13 | * |
| 19 | 14 | * @package IvyForms\Services\InstallActions |
| @@ -33,15 +28,13 @@ | ||
| 33 | 28 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 34 | 29 | } |
| 35 | 30 | } |
| 36 | 31 | |
| 37 | - if ( | |
| 38 | - defined('IVYFORMS_PLUGIN_SLUG') && | |
| 39 | - is_plugin_active_for_network(IVYFORMS_PLUGIN_SLUG) // @phpstan-ignore argument.type | |
| 40 | - ) { | |
| 32 | + if (defined('IVYFORMS_PLUGIN_SLUG') && is_plugin_active_for_network(IVYFORMS_PLUGIN_SLUG)) { | |
| 41 | 33 | switch_to_blog($siteId); |
| 42 | 34 | //Create database table if not exists |
| 43 | 35 | ActivationDatabaseHook::init(); |
| 36 | + ActivationCapabilitiesHook::ensureAdministratorCaps(); | |
| 44 | 37 | restore_current_blog(); |
| 45 | 38 | } |
| 46 | 39 | } |
| 47 | 40 | } |