RestApi
1 month ago
LogHandler.php
10 months ago
LogListingRepository.php
1 month ago
LogRepository.php
2 weeks ago
LoggerFactory.php
11 months ago
LogsDownload.php
2 weeks ago
PluginVersionProcessor.php
3 years ago
index.php
3 years ago
PluginVersionProcessor.php
18 lines
| 1 | <?php declare (strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Logging; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Config\Env; |
| 9 | use MailPoetVendor\Monolog\Processor\ProcessorInterface; |
| 10 | |
| 11 | class PluginVersionProcessor implements ProcessorInterface { |
| 12 | public function __invoke(array $record): array { |
| 13 | $record['extra']['free_plugin_version'] = Env::$version; |
| 14 | $record['extra']['premium_plugin_version'] = defined('MAILPOET_PREMIUM_VERSION') ? MAILPOET_PREMIUM_VERSION : 'premium not installed'; |
| 15 | return $record; |
| 16 | } |
| 17 | } |
| 18 |