Add Blank category to templates
[MAILPOET-2345]
This commit is contained in:
committed by
Jack Kitterhing
parent
47ebcf3b84
commit
1dd0c4ec70
@ -14,7 +14,6 @@ use MailPoet\Cron\Workers\StatsNotifications\Worker;
|
||||
use MailPoet\Cron\Workers\UnsubscribeTokens;
|
||||
use MailPoet\Cron\Workers\SubscriberLinkTokens;
|
||||
use MailPoet\Mailer\MailerLog;
|
||||
use MailPoet\Models\NewsletterTemplate;
|
||||
use MailPoet\Models\Form;
|
||||
use MailPoet\Models\ScheduledTask;
|
||||
use MailPoet\Models\Segment;
|
||||
@ -163,7 +162,6 @@ class Populator {
|
||||
$this->createDefaultUsersFlags();
|
||||
$this->createMailPoetPage();
|
||||
$this->createSourceForSubscribers();
|
||||
$this->updateNewsletterCategories();
|
||||
$this->updateMetaFields();
|
||||
$this->scheduleInitialInactiveSubscribersCheck();
|
||||
$this->scheduleAuthorizedSendingEmailsCheck();
|
||||
@ -561,20 +559,6 @@ class Populator {
|
||||
);
|
||||
}
|
||||
|
||||
private function updateNewsletterCategories() {
|
||||
global $wpdb;
|
||||
// perform once for versions below or equal to 3.14.0
|
||||
if (version_compare($this->settings->get('db_version', '3.14.1'), '3.14.0', '>')) {
|
||||
return false;
|
||||
}
|
||||
$query = "UPDATE `%s` SET categories = REPLACE(REPLACE(categories, ',\"blank\"', ''), ',\"sample\"', ',\"all\"')";
|
||||
$wpdb->query(sprintf(
|
||||
$query,
|
||||
NewsletterTemplate::$_table
|
||||
));
|
||||
return true;
|
||||
}
|
||||
|
||||
private function updateMetaFields() {
|
||||
global $wpdb;
|
||||
// perform once for versions below or equal to 3.26.0
|
||||
|
@ -21,7 +21,7 @@ class NewsletterBlank121Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Newsletter: Blank 1:2:1 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['standard']),
|
||||
'categories' => json_encode(['standard', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
@ -21,7 +21,7 @@ class NewsletterBlank12Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Newsletter: Blank 1:2 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['standard']),
|
||||
'categories' => json_encode(['standard', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
@ -21,7 +21,7 @@ class NewsletterBlank13Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Newsletter: Blank 1:3 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['standard']),
|
||||
'categories' => json_encode(['standard', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
@ -21,7 +21,7 @@ class NewsletterBlank1Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Newsletter: Blank 1 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['standard']),
|
||||
'categories' => json_encode(['standard', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
@ -21,7 +21,7 @@ class PostNotificationsBlank1Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Post Notifications: Blank 1 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['notification']),
|
||||
'categories' => json_encode(['notification', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
@ -21,7 +21,7 @@ class WelcomeBlank12Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Welcome Email: Blank 1:2 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['welcome']),
|
||||
'categories' => json_encode(['welcome', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
@ -21,7 +21,7 @@ class WelcomeBlank1Column {
|
||||
function get() {
|
||||
return [
|
||||
'name' => WPFunctions::get()->__("Welcome Email: Blank 1 Column", 'mailpoet'),
|
||||
'categories' => json_encode(['welcome']),
|
||||
'categories' => json_encode(['welcome', 'blank']),
|
||||
'readonly' => 1,
|
||||
'thumbnail' => $this->getThumbnail(),
|
||||
'body' => json_encode($this->getBody()),
|
||||
|
Reference in New Issue
Block a user