Files
piratepoet/lib/Config/PluginActivatedHook.php
Pavel Dohnal fa3ba609f3 Show a notice to admin if network activation
Mailpoet seems to be working on network activated multisites but we
don't support it.
[MAILPOET-923]
2017-06-14 14:30:20 +01:00

20 lines
572 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace MailPoet\Config;
class PluginActivatedHook {
/** @var DeferredAdminNotices */
private $deferredAdminNotices;
public function __construct(DeferredAdminNotices $deferredAdminNotices) {
$this->deferredAdminNotices = $deferredAdminNotices;
}
public function action($plugin, $networkWide) {
if($networkWide) {
$this->deferredAdminNotices->addNetworkAdminNotice(__('We noticed that you\'re using an unsupported environment. While MailPoet might work within a MultiSite environment, we dont support it.', 'mailpoet'));
}
}
}