PopulatorData
2 months ago
AccessControl.php
2 years ago
Activator.php
2 months ago
AssetsLoader.php
2 weeks ago
Capabilities.php
2 months ago
Changelog.php
2 months ago
DeactivationPoll.php
3 years ago
DeferredAdminNotices.php
2 months ago
Env.php
6 months ago
Hooks.php
4 weeks ago
HooksWooCommerce.php
1 month ago
Initializer.php
4 weeks ago
Installer.php
10 months ago
Localizer.php
3 years ago
Menu.php
1 month ago
PersonalDataErasers.php
1 month ago
PersonalDataExporters.php
1 month ago
PluginActivatedHook.php
3 years ago
Populator.php
2 weeks ago
PrivacyPolicy.php
1 month ago
Renderer.php
1 year ago
RendererFactory.php
3 years ago
RequirementsChecker.php
2 months ago
Router.php
2 months ago
ServicesChecker.php
3 years ago
Shortcodes.php
1 month ago
SilentUpgraderSkin.php
3 years ago
SubscriberChangesNotifier.php
2 months ago
TranslationUpdater.php
3 months ago
TwigEnvironment.php
1 year ago
TwigFileSystemCache.php
3 years ago
Updater.php
4 days ago
index.php
3 years ago
PluginActivatedHook.php
25 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Config; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\WP\Functions as WPFunctions; |
| 9 | |
| 10 | class PluginActivatedHook { |
| 11 | private $deferredAdminNotices; |
| 12 | |
| 13 | public function __construct( |
| 14 | DeferredAdminNotices $deferredAdminNotices |
| 15 | ) { |
| 16 | $this->deferredAdminNotices = $deferredAdminNotices; |
| 17 | } |
| 18 | |
| 19 | public function action($plugin, $networkWide) { |
| 20 | if ($plugin === WPFunctions::get()->pluginBasename(Env::$file) && $networkWide) { |
| 21 | $this->deferredAdminNotices->addNetworkAdminNotice(__("We noticed that you're using an unsupported environment. While MailPoet might work within a MultiSite environment, we don’t support it.", 'mailpoet')); |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 |