Export lists for email
[MAILPOET-1354]
This commit is contained in:
committed by
pavel-mailpoet
parent
f8e443ed3c
commit
8e13eb50bf
@@ -130,6 +130,7 @@ class Initializer {
|
||||
$this->setupMenu();
|
||||
$this->setupShortcodes();
|
||||
$this->setupImages();
|
||||
$this->setupPersonalDataExporters();
|
||||
|
||||
$this->setupChangelog();
|
||||
$this->setupCronTrigger();
|
||||
@@ -264,6 +265,11 @@ class Initializer {
|
||||
$hooks->init();
|
||||
}
|
||||
|
||||
function setupPersonalDataExporters() {
|
||||
$exporters = new PersonalDataExporters();
|
||||
$exporters->init();
|
||||
}
|
||||
|
||||
function handleFailedInitialization($exception) {
|
||||
// check if we are able to add pages at this point
|
||||
if(function_exists('wp_get_current_user')) {
|
||||
|
21
lib/Config/PersonalDataExporters.php
Normal file
21
lib/Config/PersonalDataExporters.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Config;
|
||||
|
||||
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SegmentsExporter;
|
||||
|
||||
class PersonalDataExporters {
|
||||
|
||||
function init() {
|
||||
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerSegmentsExporter'));
|
||||
}
|
||||
|
||||
function registerSegmentsExporter($exporters) {
|
||||
$exporters[] = array(
|
||||
'exporter_friendly_name' => __('MailPoet Lists'),
|
||||
'callback' => array(new SegmentsExporter(), 'export'),
|
||||
);
|
||||
return $exporters;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user