geno/wp-content/plugins/mailpoet/lib/Config/PluginActivatedHook.php
2024-02-01 11:54:18 +00:00

24 lines
776 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 // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
namespace MailPoet\Config;
if (!defined('ABSPATH')) exit;
use MailPoet\WP\Functions as WPFunctions;
class PluginActivatedHook {
private $deferredAdminNotices;
public function __construct(
DeferredAdminNotices $deferredAdminNotices
) {
$this->deferredAdminNotices = $deferredAdminNotices;
}
public function action($plugin, $networkWide) {
if ($plugin === WPFunctions::get()->pluginBasename(Env::$file) && $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'));
}
}
}