<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing namespace MailPoet\Config; if (!defined('ABSPATH')) exit; use MailPoet\CustomFields\CustomFieldsRepository; use MailPoet\DI\ContainerWrapper; use MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewsletterClicksExporter; use MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewsletterOpensExporter; use MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewslettersExporter; use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SegmentsExporter; use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SubscriberExporter; use MailPoet\Subscribers\SubscribersRepository; use MailPoet\WP\Functions as WPFunctions; class PersonalDataExporters { /*** @var SubscribersRepository */ private $subscribersRepository; /** * @var CustomFieldsRepository */ private $customFieldsRepository; public function __construct( SubscribersRepository $subscribersRepository, CustomFieldsRepository $customFieldsRepository ) { $this->subscribersRepository = $subscribersRepository; $this->customFieldsRepository = $customFieldsRepository; } public function init() { WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerSubscriberExporter']); WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerSegmentsExporter']); WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerNewslettersExporter']); WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerNewsletterClicksExporter']); WPFunctions::get()->addFilter('wp_privacy_personal_data_exporters', [$this, 'registerNewsletterOpensExporter']); } public function registerSegmentsExporter($exporters) { $exporters[] = [ 'exporter_friendly_name' => __('MailPoet Lists', 'mailpoet'), 'callback' => [new SegmentsExporter($this->subscribersRepository), 'export'], ]; return $exporters; } public function registerSubscriberExporter($exporters) { $exporters[] = [ 'exporter_friendly_name' => __('MailPoet Subscriber Data', 'mailpoet'), 'callback' => [new SubscriberExporter($this->subscribersRepository, $this->customFieldsRepository), 'export'], ]; return $exporters; } public function registerNewslettersExporter($exporters) { $newsletterExporter = ContainerWrapper::getInstance()->get(NewslettersExporter::class); $exporters[] = [ 'exporter_friendly_name' => __('MailPoet Emails', 'mailpoet'), 'callback' => [$newsletterExporter, 'export'], ]; return $exporters; } public function registerNewsletterClicksExporter($exporters) { $exporters[] = [ 'exporter_friendly_name' => __('MailPoet Email Clicks', 'mailpoet'), 'callback' => [ContainerWrapper::getInstance()->get(NewsletterClicksExporter::class), 'export'], ]; return $exporters; } public function registerNewsletterOpensExporter($exporters) { $exporters[] = [ 'exporter_friendly_name' => __('MailPoet Email Opens', 'mailpoet'), 'callback' => [ContainerWrapper::getInstance()->get(NewsletterOpensExporter::class), 'export'], ]; return $exporters; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
PopulatorData | Folder | 0755 |
|
|
AccessControl.php | File | 3.89 KB | 0644 |
|
Activator.php | File | 4.94 KB | 0644 |
|
AssetsLoader.php | File | 1.68 KB | 0644 |
|
Capabilities.php | File | 2.87 KB | 0644 |
|
Changelog.php | File | 5.04 KB | 0644 |
|
DeactivationPoll.php | File | 1.43 KB | 0644 |
|
DeferredAdminNotices.php | File | 1.16 KB | 0644 |
|
Env.php | File | 4.16 KB | 0644 |
|
Hooks.php | File | 20.01 KB | 0644 |
|
HooksReCaptcha.php | File | 2.92 KB | 0644 |
|
HooksWooCommerce.php | File | 6.76 KB | 0644 |
|
Initializer.php | File | 16.88 KB | 0644 |
|
Installer.php | File | 3.12 KB | 0644 |
|
Localizer.php | File | 2.49 KB | 0644 |
|
Menu.php | File | 23.54 KB | 0644 |
|
PersonalDataErasers.php | File | 769 B | 0644 |
|
PersonalDataExporters.php | File | 3.22 KB | 0644 |
|
PluginActivatedHook.php | File | 776 B | 0644 |
|
Populator.php | File | 23.37 KB | 0644 |
|
PrivacyPolicy.php | File | 4.53 KB | 0644 |
|
Renderer.php | File | 4.34 KB | 0644 |
|
RendererFactory.php | File | 670 B | 0644 |
|
RequirementsChecker.php | File | 3.73 KB | 0644 |
|
Router.php | File | 1006 B | 0644 |
|
ServicesChecker.php | File | 7.04 KB | 0644 |
|
Shortcodes.php | File | 8.63 KB | 0644 |
|
SilentUpgraderSkin.php | File | 570 B | 0644 |
|
SubscriberChangesNotifier.php | File | 5 KB | 0644 |
|
TranslationUpdater.php | File | 7.92 KB | 0644 |
|
TwigEnvironment.php | File | 694 B | 0644 |
|
TwigFileSystemCache.php | File | 853 B | 0644 |
|
Updater.php | File | 1.97 KB | 0644 |
|
index.php | File | 6 B | 0644 |
|