| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Metricool\Features\AdminNotices; |
| 6 |
|
| 7 |
use Metricool\Features\AbstractLoader; |
| 8 |
use Metricool\Traits\HasAllowlistControl; |
| 9 |
|
| 10 |
class AdminNoticesLoader extends AbstractLoader |
| 11 |
{ |
| 12 |
use HasAllowlistControl; |
| 13 |
|
| 14 |
/** |
| 15 |
* @inheritDoc |
| 16 |
*/ |
| 17 |
public function isEnabled(): bool |
| 18 |
{ |
| 19 |
return true; |
| 20 |
} |
| 21 |
|
| 22 |
/** |
| 23 |
* Feature enabled for every logged-in user with the Metricool capability |
| 24 |
*/ |
| 25 |
public function inScope(): bool |
| 26 |
{ |
| 27 |
return $this->userCanManage(); |
| 28 |
} |
| 29 |
} |
| 30 |
|