diff --git a/.circleci/fake-sendmail.php b/.circleci/fake-sendmail.php
index d948ef5621..cbd42e19f8 100755
--- a/.circleci/fake-sendmail.php
+++ b/.circleci/fake-sendmail.php
@@ -1,7 +1,7 @@
#!/usr/local/bin/php
null]) {
- if(!is_dir('assets/dist/js')) {
+ if (!is_dir('assets/dist/js')) {
mkdir('assets/dist/js', 0777, true);
}
$env = ($opts['env']) ?
@@ -91,7 +91,7 @@ class RoboFile extends \Robo\Tasks {
}
function compileCss($opts = ['env' => null]) {
- if(!is_dir('assets/dist/css')) {
+ if (!is_dir('assets/dist/css')) {
mkdir('assets/dist/css', 0777, true);
}
// Clean up folder from previous files
@@ -119,7 +119,7 @@ class RoboFile extends \Robo\Tasks {
$manifest = [];
foreach (glob('assets/dist/css/*.css') as $style) {
// Hash and rename styles if production environment
- if($opts['env'] === 'production') {
+ if ($opts['env'] === 'production') {
$hashed_style = sprintf(
'%s.%s.css',
pathinfo($style)['filename'],
@@ -167,15 +167,15 @@ class RoboFile extends \Robo\Tasks {
$command = 'vendor/bin/codecept run unit';
- if($opts['file']) {
+ if ($opts['file']) {
$command .= ' -f ' . $opts['file'];
}
- if($opts['xml']) {
+ if ($opts['xml']) {
$command .= ' --xml';
}
- if($opts['debug']) {
+ if ($opts['debug']) {
$command .= ' --debug';
}
@@ -187,19 +187,19 @@ class RoboFile extends \Robo\Tasks {
$command = 'vendor/bin/codecept run integration';
- if($opts['multisite']) {
+ if ($opts['multisite']) {
$command = 'MULTISITE=true ' . $command;
}
- if($opts['file']) {
+ if ($opts['file']) {
$command .= ' -f ' . $opts['file'];
}
- if($opts['xml']) {
+ if ($opts['xml']) {
$command .= ' --xml';
}
- if($opts['debug']) {
+ if ($opts['debug']) {
$command .= ' --debug';
}
@@ -219,7 +219,7 @@ class RoboFile extends \Robo\Tasks {
($opts['xml']) ? '--coverage-xml' : '--coverage-html'
));
- if($opts['xml']) {
+ if ($opts['xml']) {
$command .= ' --xml';
}
return $this->_exec($command);
@@ -234,7 +234,7 @@ class RoboFile extends \Robo\Tasks {
'tests/javascript/testBundles/**/*.js'
));
- if(!empty($xml_output_file)) {
+ if (!empty($xml_output_file)) {
$command .= sprintf(
' --reporter xunit --reporter-options output="%s"',
$xml_output_file
@@ -394,7 +394,7 @@ class RoboFile extends \Robo\Tasks {
$collection = $this->collectionBuilder();
// Clean up the SVN dir for faster shallow checkout
- if(file_exists($svn_dir)) {
+ if (file_exists($svn_dir)) {
$collection->taskExecStack()
->exec('rm -rf ' . $svn_dir);
}
@@ -434,13 +434,13 @@ class RoboFile extends \Robo\Tasks {
$plugin_dist_name = 'mailpoet';
$plugin_dist_file = $plugin_dist_name . '.zip';
- if(!$plugin_version) {
+ if (!$plugin_version) {
throw new \Exception('Could not parse plugin version, check the plugin header');
}
$this->say('Publishing version: ' . $plugin_version);
// Sanity checks
- if(!is_readable($plugin_dist_file)) {
+ if (!is_readable($plugin_dist_file)) {
$this->say("Failed to access " . $plugin_dist_file);
return;
} elseif (!file_exists($svn_dir . "/.svn/")) {
@@ -454,7 +454,7 @@ class RoboFile extends \Robo\Tasks {
$collection = $this->collectionBuilder();
// Clean up tmp dirs if the previous run was halted
- if(file_exists("$svn_dir/trunk_new") || file_exists("$svn_dir/trunk_old")) {
+ if (file_exists("$svn_dir/trunk_new") || file_exists("$svn_dir/trunk_old")) {
$collection->taskFileSystemStack()
->stopOnFail()
->remove(array("$svn_dir/trunk_new", "$svn_dir/trunk_old"));
@@ -466,7 +466,7 @@ class RoboFile extends \Robo\Tasks {
->preserveTopDirectory(false);
// Rename current trunk
- if(file_exists("$svn_dir/trunk")) {
+ if (file_exists("$svn_dir/trunk")) {
$collection->taskFileSystemStack()
->rename("$svn_dir/trunk", "$svn_dir/trunk_old");
}
@@ -482,7 +482,7 @@ class RoboFile extends \Robo\Tasks {
->mirror('./plugin_repository/assets', "$svn_dir/assets_new");
// Rename current assets folder
- if(file_exists("$svn_dir/assets")) {
+ if (file_exists("$svn_dir/assets")) {
$collection->taskFileSystemStack()
->rename("$svn_dir/assets", "$svn_dir/assets_old");
}
@@ -509,12 +509,12 @@ class RoboFile extends \Robo\Tasks {
$result = $collection->run();
- if($result->wasSuccessful()) {
+ if ($result->wasSuccessful()) {
// Run or suggest release command depending on a flag
$repo_url = "https://plugins.svn.wordpress.org/$plugin_dist_name";
$release_cmd = "svn ci -m \"Release $plugin_version\"";
$tag_cmd = "svn copy $repo_url/trunk $repo_url/tags/$plugin_version -m \"Tag $plugin_version\"";
- if(!empty($opts['force'])) {
+ if (!empty($opts['force'])) {
$svn_login = getenv('WP_SVN_USERNAME');
$svn_password = getenv('WP_SVN_PASSWORD');
if ($svn_login && $svn_password) {
@@ -553,7 +553,7 @@ class RoboFile extends \Robo\Tasks {
function changelogUpdate($opts = ['version-name' => null]) {
$this->say("Updating changelog");
$outputs = $this->getChangelogController()->update($opts['version-name']);
- if($opts['quiet']) {
+ if ($opts['quiet']) {
return;
}
$this->say("Changelog \n{$outputs[0]} \n{$outputs[1]}\n\n");
@@ -598,7 +598,7 @@ class RoboFile extends \Robo\Tasks {
public function writeReleaseVersion($version) {
$version = trim($version);
- if(!preg_match('/\d+\.\d+\.\d+/', $version)) {
+ if (!preg_match('/\d+\.\d+\.\d+/', $version)) {
$this->yell('Incorrect version format', 40, 'red');
exit(1);
}
diff --git a/lib/API/API.php b/lib/API/API.php
index 03214e6916..ee79f6234a 100644
--- a/lib/API/API.php
+++ b/lib/API/API.php
@@ -5,7 +5,7 @@ namespace MailPoet\API;
use MailPoet\DI\ContainerWrapper;
use MailPoetVendor\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class API {
static function MP($version) {
diff --git a/lib/API/JSON/API.php b/lib/API/JSON/API.php
index 04920fcd86..7911de76f1 100644
--- a/lib/API/JSON/API.php
+++ b/lib/API/JSON/API.php
@@ -8,7 +8,7 @@ use MailPoet\Util\Helpers;
use MailPoet\Util\Security;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class API {
private $_request_api_version;
@@ -26,7 +26,7 @@ class API {
/** @var AccessControl */
private $access_control;
-
+
/** @var WPFunctions */
private $wp;
@@ -84,7 +84,7 @@ class API {
$this->_request_method === 'subscribe'
);
- if(!$ignoreToken && $this->checkToken() === false) {
+ if (!$ignoreToken && $this->checkToken() === false) {
$error_message = __("Sorry, but we couldn't connect to the MailPoet server. Please refresh the web page and try again.", 'mailpoet');
$error_response = $this->createErrorResponse(Error::UNAUTHORIZED, $error_message, Response::STATUS_UNAUTHORIZED);
return $error_response->send();
@@ -111,7 +111,7 @@ class API {
? trim($data['token'])
: null;
- if(!$this->_request_endpoint || !$this->_request_method || !$this->_request_api_version) {
+ if (!$this->_request_endpoint || !$this->_request_method || !$this->_request_api_version) {
$error_message = __('Invalid API request.', 'mailpoet');
$error_response = $this->createErrorResponse(Error::BAD_REQUEST, $error_message, Response::STATUS_BAD_REQUEST);
return $error_response;
@@ -122,7 +122,7 @@ class API {
$namespace,
ucfirst($this->_request_endpoint)
);
- if($this->container->has($endpoint_class)) {
+ if ($this->container->has($endpoint_class)) {
$this->_request_endpoint_class = $endpoint_class;
break;
}
@@ -132,7 +132,7 @@ class API {
: array();
// remove reserved keywords from data
- if(is_array($this->_request_data) && !empty($this->_request_data)) {
+ if (is_array($this->_request_data) && !empty($this->_request_data)) {
// filter out reserved keywords from data
$reserved_keywords = array(
'token',
@@ -152,20 +152,20 @@ class API {
function processRoute() {
try {
- if(empty($this->_request_endpoint_class) ||
+ if (empty($this->_request_endpoint_class) ||
!$this->container->has($this->_request_endpoint_class)
) {
throw new \Exception(__('Invalid API endpoint.', 'mailpoet'));
}
$endpoint = $this->container->get($this->_request_endpoint_class);
- if(!method_exists($endpoint, $this->_request_method)) {
+ if (!method_exists($endpoint, $this->_request_method)) {
throw new \Exception(__('Invalid API endpoint method.', 'mailpoet'));
}
// check the accessibility of the requested endpoint's action
// by default, an endpoint's action is considered "private"
- if(!$this->validatePermissions($this->_request_method, $endpoint->permissions)) {
+ if (!$this->validatePermissions($this->_request_method, $endpoint->permissions)) {
$error_message = __('You do not have the required permissions.', 'mailpoet');
$error_response = $this->createErrorResponse(Error::FORBIDDEN, $error_message, Response::STATUS_FORBIDDEN);
return $error_response;
@@ -203,7 +203,7 @@ class API {
}
function addEndpointNamespace($namespace, $version) {
- if(!empty($this->_endpoint_namespaces[$version][$namespace])) return;
+ if (!empty($this->_endpoint_namespaces[$version][$namespace])) return;
$this->_endpoint_namespaces[$version][] = $namespace;
}
diff --git a/lib/API/JSON/Endpoint.php b/lib/API/JSON/Endpoint.php
index 17427147f1..4c9aef5ede 100644
--- a/lib/API/JSON/Endpoint.php
+++ b/lib/API/JSON/Endpoint.php
@@ -4,7 +4,7 @@ namespace MailPoet\API\JSON;
use MailPoet\Config\AccessControl;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
abstract class Endpoint {
public $permissions = array(
@@ -21,7 +21,7 @@ abstract class Endpoint {
function errorResponse(
$errors = array(), $meta = array(), $status = Response::STATUS_NOT_FOUND
) {
- if(empty($errors)) {
+ if (empty($errors)) {
$errors = array(
Error::UNKNOWN => __('An unknown error occurred.', 'mailpoet')
);
@@ -30,7 +30,7 @@ abstract class Endpoint {
}
function badRequest($errors = array(), $meta = array()) {
- if(empty($errors)) {
+ if (empty($errors)) {
$errors = array(
Error::BAD_REQUEST => __('Invalid request parameters', 'mailpoet')
);
diff --git a/lib/API/JSON/Error.php b/lib/API/JSON/Error.php
index 7ca26ec114..dc284b80be 100644
--- a/lib/API/JSON/Error.php
+++ b/lib/API/JSON/Error.php
@@ -1,7 +1,7 @@
getData();
$response = array();
- if(!empty($this->meta)) {
+ if (!empty($this->meta)) {
$response['meta'] = $this->meta;
}
- if($data !== null) {
+ if ($data !== null) {
$response = array_merge($response, $data);
}
- if(!empty($response)) {
+ if (!empty($response)) {
@header('Content-Type: application/json; charset='.get_option('blog_charset'));
echo wp_json_encode($response);
}
@@ -41,4 +41,4 @@ abstract class Response {
}
abstract function getData();
-}
\ No newline at end of file
+}
diff --git a/lib/API/JSON/SuccessResponse.php b/lib/API/JSON/SuccessResponse.php
index 89f19fe5a9..736103806f 100644
--- a/lib/API/JSON/SuccessResponse.php
+++ b/lib/API/JSON/SuccessResponse.php
@@ -1,7 +1,7 @@
data === null) return null;
+ if ($this->data === null) return null;
return array(
'data' => $this->data
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/API/JSON/v1/AutomatedLatestContent.php b/lib/API/JSON/v1/AutomatedLatestContent.php
index 0a0e184cb4..20bab3ee79 100644
--- a/lib/API/JSON/v1/AutomatedLatestContent.php
+++ b/lib/API/JSON/v1/AutomatedLatestContent.php
@@ -7,7 +7,7 @@ use MailPoet\Config\AccessControl;
use MailPoet\WP\Functions as WPFunctions;
use MailPoet\WP\Posts as WPPosts;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class AutomatedLatestContent extends APIEndpoint {
/** @var \MailPoet\Newsletter\AutomatedLatestContent */
diff --git a/lib/API/JSON/v1/CustomFields.php b/lib/API/JSON/v1/CustomFields.php
index 823f0552a5..9237d1c991 100644
--- a/lib/API/JSON/v1/CustomFields.php
+++ b/lib/API/JSON/v1/CustomFields.php
@@ -7,7 +7,7 @@ use MailPoet\API\JSON\Error as APIError;
use MailPoet\Config\AccessControl;
use MailPoet\Models\CustomField;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class CustomFields extends APIEndpoint {
public $permissions = array(
@@ -26,7 +26,7 @@ class CustomFields extends APIEndpoint {
function delete($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : null);
$custom_field = CustomField::findOne($id);
- if($custom_field === false) {
+ if ($custom_field === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This custom field does not exist.', 'mailpoet')
));
@@ -41,7 +41,7 @@ class CustomFields extends APIEndpoint {
$custom_field = CustomField::createOrUpdate($data);
$errors = $custom_field->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
} else {
return $this->successResponse(
@@ -53,7 +53,7 @@ class CustomFields extends APIEndpoint {
function get($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : null);
$custom_field = CustomField::findOne($id);
- if($custom_field === false) {
+ if ($custom_field === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This custom field does not exist.', 'mailpoet')
));
@@ -61,4 +61,4 @@ class CustomFields extends APIEndpoint {
return $this->successResponse($custom_field->asArray());
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/API/JSON/v1/Forms.php b/lib/API/JSON/v1/Forms.php
index ef3272c2d0..a19f148cb2 100644
--- a/lib/API/JSON/v1/Forms.php
+++ b/lib/API/JSON/v1/Forms.php
@@ -11,7 +11,7 @@ use MailPoet\Listing;
use MailPoet\Models\Form;
use MailPoet\Models\StatisticsForms;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Forms extends APIEndpoint {
@@ -36,7 +36,7 @@ class Forms extends APIEndpoint {
function get($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form = Form::findOne($id);
- if($form === false) {
+ if ($form === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
@@ -110,7 +110,7 @@ class Forms extends APIEndpoint {
$form = Form::createOrUpdate($data);
$errors = $form->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
} else {
return $this->successResponse(
@@ -138,7 +138,7 @@ class Forms extends APIEndpoint {
function exportsEditor($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form = Form::findOne($id);
- if($form === false) {
+ if ($form === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
@@ -160,9 +160,9 @@ class Forms extends APIEndpoint {
// check if the form is used as a widget
$is_widget = false;
$widgets = get_option('widget_mailpoet_form');
- if(!empty($widgets)) {
+ if (!empty($widgets)) {
foreach ($widgets as $widget) {
- if(isset($widget['form']) && (int)$widget['form'] === $form_id) {
+ if (isset($widget['form']) && (int)$widget['form'] === $form_id) {
$is_widget = true;
break;
}
@@ -174,9 +174,9 @@ class Forms extends APIEndpoint {
$has_segment_selection = false;
$list_selection = [];
foreach ($body as $i => $block) {
- if($block['type'] === 'segment') {
+ if ($block['type'] === 'segment') {
$has_segment_selection = true;
- if(!empty($block['params']['values'])) {
+ if (!empty($block['params']['values'])) {
$list_selection = array_filter(
array_map(function($segment) {
return (isset($segment['id'])
@@ -191,7 +191,7 @@ class Forms extends APIEndpoint {
}
// check list selection
- if($has_segment_selection === true) {
+ if ($has_segment_selection === true) {
$settings['segments_selected_by'] = 'user';
$settings['segments'] = $list_selection;
} else {
@@ -208,7 +208,7 @@ class Forms extends APIEndpoint {
$errors = $form->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
} else {
return $this->successResponse(
@@ -221,7 +221,7 @@ class Forms extends APIEndpoint {
function restore($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form = Form::findOne($id);
- if($form === false) {
+ if ($form === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
@@ -237,7 +237,7 @@ class Forms extends APIEndpoint {
function trash($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form = Form::findOne($id);
- if($form === false) {
+ if ($form === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
@@ -253,7 +253,7 @@ class Forms extends APIEndpoint {
function delete($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form = Form::findOne($id);
- if($form === false) {
+ if ($form === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
@@ -267,7 +267,7 @@ class Forms extends APIEndpoint {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form = Form::findOne($id);
- if($form === false) {
+ if ($form === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
@@ -278,7 +278,7 @@ class Forms extends APIEndpoint {
$duplicate = $form->duplicate($data);
$errors = $duplicate->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
} else {
return $this->successResponse(
diff --git a/lib/API/JSON/v1/ImportExport.php b/lib/API/JSON/v1/ImportExport.php
index 30d0925b60..40ee0aeb38 100644
--- a/lib/API/JSON/v1/ImportExport.php
+++ b/lib/API/JSON/v1/ImportExport.php
@@ -7,7 +7,7 @@ use MailPoet\Config\AccessControl;
use MailPoet\Models\Segment;
use MailPoet\Subscribers\ImportExport\Import\MailChimp;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class ImportExport extends APIEndpoint {
public $permissions = array(
@@ -42,7 +42,7 @@ class ImportExport extends APIEndpoint {
$segment = Segment::createOrUpdate($data);
$errors = $segment->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
} else {
return $this->successResponse(
diff --git a/lib/API/JSON/v1/MP2Migrator.php b/lib/API/JSON/v1/MP2Migrator.php
index 5a82277302..0425c0d0ad 100644
--- a/lib/API/JSON/v1/MP2Migrator.php
+++ b/lib/API/JSON/v1/MP2Migrator.php
@@ -5,7 +5,7 @@ namespace MailPoet\API\JSON\v1;
use MailPoet\API\JSON\Endpoint as APIEndpoint;
use MailPoet\Config\AccessControl;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class MP2Migrator extends APIEndpoint {
public $permissions = array(
diff --git a/lib/API/JSON/v1/Mailer.php b/lib/API/JSON/v1/Mailer.php
index 7f230a58ac..6c592f320e 100644
--- a/lib/API/JSON/v1/Mailer.php
+++ b/lib/API/JSON/v1/Mailer.php
@@ -7,7 +7,7 @@ use MailPoet\API\JSON\Error as APIError;
use MailPoet\Config\AccessControl;
use MailPoet\Mailer\MailerLog;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Mailer extends APIEndpoint {
public $permissions = array(
@@ -28,7 +28,7 @@ class Mailer extends APIEndpoint {
));
}
- if($result['response'] === false) {
+ if ($result['response'] === false) {
$error = sprintf(
__('The email could not be sent: %s', 'mailpoet'),
$result['error']->getMessage()
diff --git a/lib/API/JSON/v1/NewsletterTemplates.php b/lib/API/JSON/v1/NewsletterTemplates.php
index 69e193e49a..df7c8c474b 100644
--- a/lib/API/JSON/v1/NewsletterTemplates.php
+++ b/lib/API/JSON/v1/NewsletterTemplates.php
@@ -7,7 +7,7 @@ use MailPoet\API\JSON\Error as APIError;
use MailPoet\Config\AccessControl;
use MailPoet\Models\NewsletterTemplate;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class NewsletterTemplates extends APIEndpoint {
public $permissions = array(
@@ -17,7 +17,7 @@ class NewsletterTemplates extends APIEndpoint {
function get($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$template = NewsletterTemplate::findOne($id);
- if($template === false) {
+ if ($template === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This template does not exist.', 'mailpoet')
));
@@ -43,9 +43,9 @@ class NewsletterTemplates extends APIEndpoint {
}
function save($data = array()) {
- if(!empty($data['newsletter_id'])) {
+ if (!empty($data['newsletter_id'])) {
$template = NewsletterTemplate::whereEqual('newsletter_id', $data['newsletter_id'])->findOne();
- if(!empty($template)) {
+ if (!empty($template)) {
$data['id'] = $template->id;
}
}
@@ -55,7 +55,7 @@ class NewsletterTemplates extends APIEndpoint {
NewsletterTemplate::cleanRecentlySent($data);
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
} else {
return $this->successResponse(
@@ -67,7 +67,7 @@ class NewsletterTemplates extends APIEndpoint {
function delete($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$template = NewsletterTemplate::findOne($id);
- if($template === false) {
+ if ($template === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This template does not exist.', 'mailpoet')
));
diff --git a/lib/API/JSON/v1/Newsletters.php b/lib/API/JSON/v1/Newsletters.php
index b1d97a528b..37272ffcfa 100644
--- a/lib/API/JSON/v1/Newsletters.php
+++ b/lib/API/JSON/v1/Newsletters.php
@@ -23,7 +23,7 @@ use MailPoet\Newsletter\Url as NewsletterUrl;
use MailPoet\Settings\SettingsController;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Newsletters extends APIEndpoint {
@@ -58,7 +58,7 @@ class Newsletters extends APIEndpoint {
function get($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -77,20 +77,20 @@ class Newsletters extends APIEndpoint {
$data = $this->wp->applyFilters('mailpoet_api_newsletters_save_before', $data);
$segments = array();
- if(isset($data['segments'])) {
+ if (isset($data['segments'])) {
$segments = $data['segments'];
unset($data['segments']);
}
$options = array();
- if(isset($data['options'])) {
+ if (isset($data['options'])) {
$options = $data['options'];
unset($data['options']);
}
- if(!empty($data['template_id'])) {
+ if (!empty($data['template_id'])) {
$template = NewsletterTemplate::whereEqual('id', $data['template_id'])->findOne();
- if(!empty($template)) {
+ if (!empty($template)) {
$template = $template->asArray();
$data['body'] = $template['body'];
}
@@ -100,16 +100,16 @@ class Newsletters extends APIEndpoint {
$newsletter = Newsletter::createOrUpdate($data);
$errors = $newsletter->getErrors();
- if(!empty($errors)) return $this->badRequest($errors);
+ if (!empty($errors)) return $this->badRequest($errors);
// Re-fetch newsletter to sync changes made by DB
// updated_at column use CURRENT_TIMESTAMP for update and this change is not updated automatically by ORM
$newsletter = Newsletter::findOne($newsletter->id);
- if(!empty($segments)) {
+ if (!empty($segments)) {
NewsletterSegment::where('newsletter_id', $newsletter->id)
->deleteMany();
foreach ($segments as $segment) {
- if(!is_array($segment)) continue;
+ if (!is_array($segment)) continue;
$relation = NewsletterSegment::create();
$relation->segment_id = (int)$segment['id'];
$relation->newsletter_id = $newsletter->id;
@@ -117,18 +117,18 @@ class Newsletters extends APIEndpoint {
}
}
- if(isset($data['sender_address']) && isset($data['sender_name'])) {
+ if (isset($data['sender_address']) && isset($data['sender_name'])) {
Setting::saveDefaultSenderIfNeeded($data['sender_address'], $data['sender_name']);
}
- if(!empty($options)) {
+ if (!empty($options)) {
$option_fields = NewsletterOptionField::where(
'newsletter_type',
$newsletter->type
)->findMany();
// update newsletter options
foreach ($option_fields as $option_field) {
- if(isset($options[$option_field->name])) {
+ if (isset($options[$option_field->name])) {
$newsletter_option = NewsletterOption::createOrUpdate(
array(
'newsletter_id' => $newsletter->id,
@@ -141,7 +141,7 @@ class Newsletters extends APIEndpoint {
// reload newsletter with updated options
$newsletter = Newsletter::filter('filterWithOptions', $newsletter->type)->findOne($newsletter->id);
// if this is a post notification, process newsletter options and update its schedule
- if($newsletter->type === Newsletter::TYPE_NOTIFICATION) {
+ if ($newsletter->type === Newsletter::TYPE_NOTIFICATION) {
// generate the new schedule from options and get the new "next run" date
$newsletter->schedule = Scheduler::processPostNotificationSchedule($newsletter);
$next_run_date = Scheduler::getNextRunDate($newsletter->schedule);
@@ -155,9 +155,9 @@ class Newsletters extends APIEndpoint {
}
$queue = $newsletter->getQueue();
- if($queue && !in_array($newsletter->type, array(Newsletter::TYPE_NOTIFICATION, Newsletter::TYPE_NOTIFICATION_HISTORY))) {
+ if ($queue && !in_array($newsletter->type, array(Newsletter::TYPE_NOTIFICATION, Newsletter::TYPE_NOTIFICATION_HISTORY))) {
// if newsletter was previously scheduled and is now unscheduled, set its status to DRAFT and delete associated queue record
- if($newsletter->status === Newsletter::STATUS_SCHEDULED && isset($options['isScheduled']) && empty($options['isScheduled'])) {
+ if ($newsletter->status === Newsletter::STATUS_SCHEDULED && isset($options['isScheduled']) && empty($options['isScheduled'])) {
$queue->delete();
$newsletter->status = Newsletter::STATUS_DRAFT;
$newsletter->save();
@@ -183,7 +183,7 @@ class Newsletters extends APIEndpoint {
function setStatus($data = array()) {
$status = (isset($data['status']) ? $data['status'] : null);
- if(!$status) {
+ if (!$status) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('You need to specify a status.', 'mailpoet')
));
@@ -192,7 +192,7 @@ class Newsletters extends APIEndpoint {
$id = (isset($data['id'])) ? (int)$data['id'] : false;
$newsletter = Newsletter::findOneWithOptions($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -201,15 +201,15 @@ class Newsletters extends APIEndpoint {
$newsletter->setStatus($status);
$errors = $newsletter->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
}
// if there are past due notifications, reschedule them for the next send date
- if($newsletter->type === Newsletter::TYPE_NOTIFICATION && $status === Newsletter::STATUS_ACTIVE) {
+ if ($newsletter->type === Newsletter::TYPE_NOTIFICATION && $status === Newsletter::STATUS_ACTIVE) {
$next_run_date = Scheduler::getNextRunDate($newsletter->schedule);
$queue = $newsletter->queue()->findOne();
- if($queue) {
+ if ($queue) {
$queue->task()
->whereLte('scheduled_at', Carbon::createFromTimestamp($this->wp->currentTime('timestamp')))
->where('status', SendingQueue::STATUS_SCHEDULED)
@@ -229,7 +229,7 @@ class Newsletters extends APIEndpoint {
function restore($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -245,7 +245,7 @@ class Newsletters extends APIEndpoint {
function trash($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -261,7 +261,7 @@ class Newsletters extends APIEndpoint {
function delete($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -275,7 +275,7 @@ class Newsletters extends APIEndpoint {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -286,7 +286,7 @@ class Newsletters extends APIEndpoint {
$duplicate = $newsletter->duplicate($data);
$errors = $duplicate->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
} else {
$this->wp->doAction('mailpoet_api_newsletters_duplicate_after', $newsletter, $duplicate);
@@ -299,7 +299,7 @@ class Newsletters extends APIEndpoint {
}
function showPreview($data = array()) {
- if(empty($data['body'])) {
+ if (empty($data['body'])) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Newsletter data is missing.', 'mailpoet')
));
@@ -308,7 +308,7 @@ class Newsletters extends APIEndpoint {
$id = (isset($data['id'])) ? (int)$data['id'] : false;
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -332,7 +332,7 @@ class Newsletters extends APIEndpoint {
}
function sendPreview($data = array()) {
- if(empty($data['subscriber'])) {
+ if (empty($data['subscriber'])) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please specify receiver information.', 'mailpoet')
));
@@ -341,7 +341,7 @@ class Newsletters extends APIEndpoint {
$id = (isset($data['id'])) ? (int)$data['id'] : false;
$newsletter = Newsletter::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -383,7 +383,7 @@ class Newsletters extends APIEndpoint {
$extra_params = array('unsubscribe_url' => home_url());
$result = $mailer->send($rendered_newsletter, $data['subscriber'], $extra_params);
- if($result['response'] === false) {
+ if ($result['response'] === false) {
$error = sprintf(
__('The email could not be sent: %s', 'mailpoet'),
$result['error']->getMessage()
@@ -409,7 +409,7 @@ class Newsletters extends APIEndpoint {
foreach ($listing_data['items'] as $newsletter) {
$queue = false;
- if($newsletter->type === Newsletter::TYPE_STANDARD) {
+ if ($newsletter->type === Newsletter::TYPE_STANDARD) {
$newsletter
->withSegments(true)
->withSendingQueue()
@@ -432,7 +432,7 @@ class Newsletters extends APIEndpoint {
->withStatistics();
}
- if($newsletter->status === Newsletter::STATUS_SENT ||
+ if ($newsletter->status === Newsletter::STATUS_SENT ||
$newsletter->status === Newsletter::STATUS_SENDING
) {
$queue = $newsletter->getQueue();
@@ -473,7 +473,7 @@ class Newsletters extends APIEndpoint {
function create($data = array()) {
$options = array();
- if(isset($data['options'])) {
+ if (isset($data['options'])) {
$options = $data['options'];
unset($data['options']);
}
@@ -481,13 +481,13 @@ class Newsletters extends APIEndpoint {
$newsletter = Newsletter::createOrUpdate($data);
$errors = $newsletter->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
} else {
// try to load template data
$template_id = (isset($data['template']) ? (int)$data['template'] : false);
$template = NewsletterTemplate::findOne($template_id);
- if($template === false) {
+ if ($template === false) {
$newsletter->body = array();
} else {
$newsletter->body = $template->body;
@@ -496,16 +496,16 @@ class Newsletters extends APIEndpoint {
$newsletter->save();
$errors = $newsletter->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
} else {
- if(!empty($options)) {
+ if (!empty($options)) {
$option_fields = NewsletterOptionField::where(
'newsletter_type', $newsletter->type
)->findArray();
foreach ($option_fields as $option_field) {
- if(isset($options[$option_field['name']])) {
+ if (isset($options[$option_field['name']])) {
$relation = NewsletterOption::create();
$relation->newsletter_id = $newsletter->id;
$relation->option_field_id = $option_field['id'];
@@ -515,7 +515,7 @@ class Newsletters extends APIEndpoint {
}
}
- if(
+ if (
empty($data['id'])
&&
isset($data['type'])
diff --git a/lib/API/JSON/v1/Segments.php b/lib/API/JSON/v1/Segments.php
index c56bdfb52d..a9a910f225 100644
--- a/lib/API/JSON/v1/Segments.php
+++ b/lib/API/JSON/v1/Segments.php
@@ -9,7 +9,7 @@ use MailPoet\Listing;
use MailPoet\Models\Segment;
use MailPoet\Segments\WP;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Segments extends APIEndpoint {
public $permissions = array(
@@ -33,7 +33,7 @@ class Segments extends APIEndpoint {
function get($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$segment = Segment::findOne($id);
- if($segment === false) {
+ if ($segment === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
@@ -67,7 +67,7 @@ class Segments extends APIEndpoint {
$segment = Segment::createOrUpdate($data);
$errors = $segment->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
} else {
return $this->successResponse(
@@ -79,7 +79,7 @@ class Segments extends APIEndpoint {
function restore($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$segment = Segment::findOne($id);
- if($segment === false) {
+ if ($segment === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
@@ -95,7 +95,7 @@ class Segments extends APIEndpoint {
function trash($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$segment = Segment::findOne($id);
- if($segment === false) {
+ if ($segment === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
@@ -111,7 +111,7 @@ class Segments extends APIEndpoint {
function delete($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$segment = Segment::findOne($id);
- if($segment === false) {
+ if ($segment === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
@@ -125,7 +125,7 @@ class Segments extends APIEndpoint {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$segment = Segment::findOne($id);
- if($segment === false) {
+ if ($segment === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
@@ -136,7 +136,7 @@ class Segments extends APIEndpoint {
$duplicate = $segment->duplicate($data);
$errors = $duplicate->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
} else {
return $this->successResponse(
diff --git a/lib/API/JSON/v1/SendingQueue.php b/lib/API/JSON/v1/SendingQueue.php
index e0d04d953c..cae711f200 100644
--- a/lib/API/JSON/v1/SendingQueue.php
+++ b/lib/API/JSON/v1/SendingQueue.php
@@ -11,7 +11,7 @@ use MailPoet\Newsletter\Scheduler\Scheduler;
use MailPoet\Segments\SubscribersFinder;
use MailPoet\Tasks\Sending as SendingTask;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class SendingQueue extends APIEndpoint {
public $permissions = array(
@@ -27,7 +27,7 @@ class SendingQueue extends APIEndpoint {
// check that the newsletter exists
$newsletter = Newsletter::findOneWithOptions($newsletter_id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
@@ -48,7 +48,7 @@ class SendingQueue extends APIEndpoint {
->whereNull('tasks.status')
->findOne();
- if(!empty($queue)) {
+ if (!empty($queue)) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter is already being sent.', 'mailpoet')
));
@@ -58,14 +58,14 @@ class SendingQueue extends APIEndpoint {
->where('queues.newsletter_id', $newsletter->id)
->where('tasks.status', SendingQueueModel::STATUS_SCHEDULED)
->findOne();
- if($scheduled_queue) {
+ if ($scheduled_queue) {
$queue = SendingTask::createFromQueue($scheduled_queue);
} else {
$queue = SendingTask::create();
$queue->newsletter_id = $newsletter->id;
}
- if((bool)$newsletter->isScheduled) {
+ if ((bool)$newsletter->isScheduled) {
// set newsletter status
$newsletter->setStatus(Newsletter::STATUS_SCHEDULED);
@@ -76,7 +76,7 @@ class SendingQueue extends APIEndpoint {
$segments = $newsletter->segments()->findMany();
$finder = new SubscribersFinder();
$subscribers_count = $finder->addSubscribersToTaskFromSegments($queue->task(), $segments);
- if(!$subscribers_count) {
+ if (!$subscribers_count) {
return $this->errorResponse(array(
APIError::UNKNOWN => __('There are no subscribers in that list!', 'mailpoet')
));
@@ -91,7 +91,7 @@ class SendingQueue extends APIEndpoint {
$queue->save();
$errors = $queue->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->errorResponse($errors);
} else {
return $this->successResponse(
@@ -107,14 +107,14 @@ class SendingQueue extends APIEndpoint {
);
$newsletter = Newsletter::findOne($newsletter_id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$queue = $newsletter->getQueue();
- if($queue === false) {
+ if ($queue === false) {
return $this->errorResponse(array(
APIError::UNKNOWN => __('This newsletter has not been sent yet.', 'mailpoet')
));
@@ -133,14 +133,14 @@ class SendingQueue extends APIEndpoint {
: false
);
$newsletter = Newsletter::findOne($newsletter_id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$queue = $newsletter->getQueue();
- if($queue === false) {
+ if ($queue === false) {
return $this->errorResponse(array(
APIError::UNKNOWN => __('This newsletter has not been sent yet.', 'mailpoet')
));
diff --git a/lib/API/JSON/v1/Services.php b/lib/API/JSON/v1/Services.php
index b6fed19d74..8c7fe8aec9 100644
--- a/lib/API/JSON/v1/Services.php
+++ b/lib/API/JSON/v1/Services.php
@@ -11,7 +11,7 @@ use MailPoet\Models\Setting;
use MailPoet\Services\Bridge;
use MailPoet\WP\DateTime;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Services extends APIEndpoint {
public $bridge;
@@ -28,7 +28,7 @@ class Services extends APIEndpoint {
function checkMSSKey($data = array()) {
$key = isset($data['key']) ? trim($data['key']) : null;
- if(!$key) {
+ if (!$key) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please specify a key.', 'mailpoet')
));
@@ -46,7 +46,7 @@ class Services extends APIEndpoint {
$state = !empty($result['state']) ? $result['state'] : null;
$success_message = null;
- if($state == Bridge::KEY_VALID) {
+ if ($state == Bridge::KEY_VALID) {
$success_message = __('Your MailPoet Sending Service key has been successfully validated.', 'mailpoet');
} elseif ($state == Bridge::KEY_EXPIRING) {
$success_message = sprintf(
@@ -55,11 +55,11 @@ class Services extends APIEndpoint {
);
}
- if(!empty($result['data']['public_id'])) {
+ if (!empty($result['data']['public_id'])) {
Analytics::setPublicId($result['data']['public_id']);
}
- if($success_message) {
+ if ($success_message) {
return $this->successResponse(array('message' => $success_message));
}
@@ -74,7 +74,7 @@ class Services extends APIEndpoint {
$code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN;
$errorMessage = __('Error validating MailPoet Sending Service key, please try again later (%s).', 'mailpoet');
// If site runs on localhost
- if( 1 === preg_match("/^(http|https)\:\/\/(localhost|127\.0\.0\.1)/", site_url()) ) {
+ if ( 1 === preg_match("/^(http|https)\:\/\/(localhost|127\.0\.0\.1)/", site_url()) ) {
$errorMessage .= ' ' . __("Note that it doesn't work on localhost.", 'mailpoet');
}
$error = sprintf(
@@ -90,7 +90,7 @@ class Services extends APIEndpoint {
function checkPremiumKey($data = array()) {
$key = isset($data['key']) ? trim($data['key']) : null;
- if(!$key) {
+ if (!$key) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please specify a key.', 'mailpoet')
));
@@ -108,7 +108,7 @@ class Services extends APIEndpoint {
$state = !empty($result['state']) ? $result['state'] : null;
$success_message = null;
- if($state == Bridge::KEY_VALID) {
+ if ($state == Bridge::KEY_VALID) {
$success_message = __('Your Premium key has been successfully validated.', 'mailpoet');
} elseif ($state == Bridge::KEY_EXPIRING) {
$success_message = sprintf(
@@ -117,11 +117,11 @@ class Services extends APIEndpoint {
);
}
- if(!empty($result['data']['public_id'])) {
+ if (!empty($result['data']['public_id'])) {
Analytics::setPublicId($result['data']['public_id']);
}
- if($success_message) {
+ if ($success_message) {
return $this->successResponse(
array('message' => $success_message),
Installer::getPremiumStatus()
diff --git a/lib/API/JSON/v1/Settings.php b/lib/API/JSON/v1/Settings.php
index c7e01809d0..f7c43e26d7 100644
--- a/lib/API/JSON/v1/Settings.php
+++ b/lib/API/JSON/v1/Settings.php
@@ -9,7 +9,7 @@ use MailPoet\Models\Setting;
use MailPoet\Services\Bridge;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Settings extends APIEndpoint {
@@ -29,7 +29,7 @@ class Settings extends APIEndpoint {
}
function set($settings = array()) {
- if(empty($settings)) {
+ if (empty($settings)) {
return $this->badRequest(
array(
APIError::BAD_REQUEST =>
diff --git a/lib/API/JSON/v1/Setup.php b/lib/API/JSON/v1/Setup.php
index c139ed3c53..17b0c01982 100644
--- a/lib/API/JSON/v1/Setup.php
+++ b/lib/API/JSON/v1/Setup.php
@@ -8,7 +8,7 @@ use MailPoet\Config\AccessControl;
use MailPoet\Config\Activator;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Setup extends APIEndpoint {
private $wp;
diff --git a/lib/API/JSON/v1/Subscribers.php b/lib/API/JSON/v1/Subscribers.php
index 0baec30681..31e840b9ce 100644
--- a/lib/API/JSON/v1/Subscribers.php
+++ b/lib/API/JSON/v1/Subscribers.php
@@ -19,7 +19,7 @@ use MailPoet\Subscribers\Source;
use MailPoet\Subscription\Throttling as SubscriptionThrottling;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Subscribers extends APIEndpoint {
const SUBSCRIPTION_LIMIT_COOLDOWN = 60;
@@ -66,7 +66,7 @@ class Subscribers extends APIEndpoint {
function get($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$subscriber = Subscriber::findOne($id);
- if($subscriber === false) {
+ if ($subscriber === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
@@ -82,7 +82,7 @@ class Subscribers extends APIEndpoint {
function listing($data = array()) {
- if(!isset($data['filter']['segment'])) {
+ if (!isset($data['filter']['segment'])) {
$listing_data = $this->listing_handler->get('\MailPoet\Models\Subscriber', $data);
} else {
$listing_data = $this->subscribers_listings->getListingsInSegment($data);
@@ -113,24 +113,24 @@ class Subscribers extends APIEndpoint {
$recaptcha = $this->settings->get('re_captcha');
- if(!$form) {
+ if (!$form) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please specify a valid form ID.', 'mailpoet')
));
}
- if(!empty($data['email'])) {
+ if (!empty($data['email'])) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please leave the first field empty.', 'mailpoet')
));
}
- if(!empty($recaptcha['enabled']) && empty($data['recaptcha'])) {
+ if (!empty($recaptcha['enabled']) && empty($data['recaptcha'])) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please check the CAPTCHA.', 'mailpoet')
));
}
- if(!empty($recaptcha['enabled'])) {
+ if (!empty($recaptcha['enabled'])) {
$res = empty($data['recaptcha']) ? $data['recaptcha-no-js'] : $data['recaptcha'];
$res = wp_remote_post('https://www.google.com/recaptcha/api/siteverify', array(
'body' => array(
@@ -138,13 +138,13 @@ class Subscribers extends APIEndpoint {
'response' => $res
)
));
- if(is_wp_error($res)) {
+ if (is_wp_error($res)) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Error while validating the CAPTCHA.', 'mailpoet')
));
}
$res = json_decode(wp_remote_retrieve_body($res));
- if(empty($res->success)) {
+ if (empty($res->success)) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Error while validating the CAPTCHA.', 'mailpoet')
));
@@ -166,7 +166,7 @@ class Subscribers extends APIEndpoint {
$segment_ids = $form->filterSegments($segment_ids);
unset($data['segments']);
- if(empty($segment_ids)) {
+ if (empty($segment_ids)) {
return $this->badRequest(array(
APIError::BAD_REQUEST => __('Please select a list.', 'mailpoet')
));
@@ -179,26 +179,26 @@ class Subscribers extends APIEndpoint {
// make sure we don't allow too many subscriptions with the same ip address
$timeout = SubscriptionThrottling::throttle();
- if($timeout > 0) {
+ if ($timeout > 0) {
throw new \Exception(sprintf(__('You need to wait %d seconds before subscribing again.', 'mailpoet'), $timeout));
}
$subscriber = Subscriber::subscribe($data, $segment_ids);
$errors = $subscriber->getErrors();
- if($errors !== false) {
+ if ($errors !== false) {
return $this->badRequest($errors);
} else {
$meta = array();
- if($form !== false) {
+ if ($form !== false) {
// record form statistics
StatisticsForms::record($form->id, $subscriber->id);
$form = $form->asArray();
- if(!empty($form['settings']['on_success'])) {
- if($form['settings']['on_success'] === 'page') {
+ if (!empty($form['settings']['on_success'])) {
+ if ($form['settings']['on_success'] === 'page') {
// redirect to a page on a success, pass the page url in the meta
$meta['redirect_url'] = get_permalink($form['settings']['success_page']);
} else if ($form['settings']['on_success'] === 'url') {
@@ -220,22 +220,22 @@ class Subscribers extends APIEndpoint {
}
function save($data = array()) {
- if(empty($data['segments'])) {
+ if (empty($data['segments'])) {
$data['segments'] = array();
}
$subscriber = Subscriber::createOrUpdate($data);
$errors = $subscriber->getErrors();
- if(!empty($errors)) {
+ if (!empty($errors)) {
return $this->badRequest($errors);
}
- if($subscriber->isNew()) {
+ if ($subscriber->isNew()) {
$subscriber = Source::setSource($subscriber, Source::ADMINISTRATOR);
$subscriber->save();
}
- if(!empty($data['segments'])) {
+ if (!empty($data['segments'])) {
Scheduler::scheduleSubscriberWelcomeNotification($subscriber->id, $data['segments']);
}
@@ -247,7 +247,7 @@ class Subscribers extends APIEndpoint {
function restore($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$subscriber = Subscriber::findOne($id);
- if($subscriber === false) {
+ if ($subscriber === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
@@ -263,7 +263,7 @@ class Subscribers extends APIEndpoint {
function trash($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$subscriber = Subscriber::findOne($id);
- if($subscriber === false) {
+ if ($subscriber === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
@@ -279,7 +279,7 @@ class Subscribers extends APIEndpoint {
function delete($data = array()) {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$subscriber = Subscriber::findOne($id);
- if($subscriber === false) {
+ if ($subscriber === false) {
return $this->errorResponse(array(
APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
@@ -291,7 +291,7 @@ class Subscribers extends APIEndpoint {
function bulkAction($data = array()) {
try {
- if(!isset($data['listing']['filter']['segment'])) {
+ if (!isset($data['listing']['filter']['segment'])) {
return $this->successResponse(
null,
$this->bulk_action_controller->apply('\MailPoet\Models\Subscriber', $data)
diff --git a/lib/API/MP/v1/API.php b/lib/API/MP/v1/API.php
index 138bf91f90..1754bb40ee 100644
--- a/lib/API/MP/v1/API.php
+++ b/lib/API/MP/v1/API.php
@@ -12,7 +12,7 @@ use MailPoet\Subscribers\NewSubscriberNotificationMailer;
use MailPoet\Subscribers\Source;
use MailPoet\Tasks\Sending;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class API {
@@ -69,19 +69,19 @@ class API {
function subscribeToLists($subscriber_id, array $segments_ids, $options = array()) {
$schedule_welcome_email = (isset($options['schedule_welcome_email']) && $options['schedule_welcome_email'] === false) ? false : true;
- if(empty($segments_ids)) {
+ if (empty($segments_ids)) {
throw new \Exception(__('At least one segment ID is required.', 'mailpoet'));
}
// throw exception when subscriber does not exist
$subscriber = Subscriber::findOne($subscriber_id);
- if(!$subscriber) {
+ if (!$subscriber) {
throw new \Exception(__('This subscriber does not exist.', 'mailpoet'));
}
// throw exception when none of the segments exist
$found_segments = Segment::whereIn('id', $segments_ids)->findMany();
- if(!$found_segments) {
+ if (!$found_segments) {
$exception = _n('This list does not exist.', 'These lists do not exist.', count($segments_ids), 'mailpoet');
throw new \Exception($exception);
}
@@ -89,17 +89,17 @@ class API {
// throw exception when trying to subscribe to WP Users or WooCommerce Customers segments
$found_segments_ids = array();
foreach ($found_segments as $found_segment) {
- if($found_segment->type === Segment::TYPE_WP_USERS) {
+ if ($found_segment->type === Segment::TYPE_WP_USERS) {
throw new \Exception(__(sprintf("Can't subscribe to a WordPress Users list with ID %d.", $found_segment->id), 'mailpoet'));
}
- if($found_segment->type === Segment::TYPE_WC_USERS) {
+ if ($found_segment->type === Segment::TYPE_WC_USERS) {
throw new \Exception(__(sprintf("Can't subscribe to a WooCommerce Customers list with ID %d.", $found_segment->id), 'mailpoet'));
}
$found_segments_ids[] = $found_segment->id;
}
// throw an exception when one or more segments do not exist
- if(count($found_segments_ids) !== count($segments_ids)) {
+ if (count($found_segments_ids) !== count($segments_ids)) {
$missing_ids = array_values(array_diff($segments_ids, $found_segments_ids));
$exception = sprintf(
_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'),
@@ -111,7 +111,7 @@ class API {
SubscriberSegment::subscribeToSegments($subscriber, $found_segments_ids);
// schedule welcome email
- if($schedule_welcome_email && $subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
+ if ($schedule_welcome_email && $subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
$this->_scheduleWelcomeNotification($subscriber, $found_segments_ids);
}
@@ -123,19 +123,19 @@ class API {
}
function unsubscribeFromLists($subscriber_id, array $segments_ids) {
- if(empty($segments_ids)) {
+ if (empty($segments_ids)) {
throw new \Exception(__('At least one segment ID is required.', 'mailpoet'));
}
// throw exception when subscriber does not exist
$subscriber = Subscriber::findOne($subscriber_id);
- if(!$subscriber) {
+ if (!$subscriber) {
throw new \Exception(__('This subscriber does not exist.', 'mailpoet'));
}
// throw exception when none of the segments exist
$found_segments = Segment::whereIn('id', $segments_ids)->findMany();
- if(!$found_segments) {
+ if (!$found_segments) {
$exception = _n('This list does not exist.', 'These lists do not exist.', count($segments_ids), 'mailpoet');
throw new \Exception($exception);
}
@@ -143,17 +143,17 @@ class API {
// throw exception when trying to subscribe to WP Users or WooCommerce Customers segments
$found_segments_ids = array();
foreach ($found_segments as $segment) {
- if($segment->type === Segment::TYPE_WP_USERS) {
+ if ($segment->type === Segment::TYPE_WP_USERS) {
throw new \Exception(__(sprintf("Can't unsubscribe from a WordPress Users list with ID %d.", $segment->id), 'mailpoet'));
}
- if($segment->type === Segment::TYPE_WC_USERS) {
+ if ($segment->type === Segment::TYPE_WC_USERS) {
throw new \Exception(__(sprintf("Can't unsubscribe from a WooCommerce Customers list with ID %d.", $segment->id), 'mailpoet'));
}
$found_segments_ids[] = $segment->id;
}
// throw an exception when one or more segments do not exist
- if(count($found_segments_ids) !== count($segments_ids)) {
+ if (count($found_segments_ids) !== count($segments_ids)) {
$missing_ids = array_values(array_diff($segments_ids, $found_segments_ids));
$exception = sprintf(
_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'),
@@ -177,14 +177,14 @@ class API {
$skip_subscriber_notification = (isset($options['skip_subscriber_notification']) && $options['skip_subscriber_notification'] === true) ? true : false;
// throw exception when subscriber email is missing
- if(empty($subscriber['email'])) {
+ if (empty($subscriber['email'])) {
throw new \Exception(
__('Subscriber email address is required.', 'mailpoet')
);
}
// throw exception when subscriber already exists
- if(Subscriber::findOne($subscriber['email'])) {
+ if (Subscriber::findOne($subscriber['email'])) {
throw new \Exception(
__('This subscriber already exists.', 'mailpoet')
);
@@ -202,12 +202,12 @@ class API {
$new_subscriber->hydrate($default_fields);
$new_subscriber = Source::setSource($new_subscriber, Source::API);
$new_subscriber->save();
- if($new_subscriber->getErrors() !== false) {
+ if ($new_subscriber->getErrors() !== false) {
throw new \Exception(
__(sprintf('Failed to add subscriber: %s', strtolower(implode(', ', $new_subscriber->getErrors()))), 'mailpoet')
);
}
- if(!empty($custom_fields)) {
+ if (!empty($custom_fields)) {
$new_subscriber->saveCustomFields($custom_fields);
}
@@ -215,13 +215,13 @@ class API {
$new_subscriber = Subscriber::findOne($new_subscriber->id);
// subscribe to segments and optionally: 1) send confirmation email, 2) schedule welcome email(s)
- if(!empty($segments)) {
+ if (!empty($segments)) {
$this->subscribeToLists($new_subscriber->id, $segments);
// send confirmation email
- if($send_confirmation_email && $new_subscriber->status === Subscriber::STATUS_UNCONFIRMED) {
+ if ($send_confirmation_email && $new_subscriber->status === Subscriber::STATUS_UNCONFIRMED) {
$result = $this->_sendConfirmationEmail($new_subscriber);
- if(!$result && $new_subscriber->getErrors()) {
+ if (!$result && $new_subscriber->getErrors()) {
throw new \Exception(
__(sprintf('Subscriber added, but confirmation email failed to send: %s', strtolower(implode(', ', $new_subscriber->getErrors()))), 'mailpoet')
);
@@ -229,11 +229,11 @@ class API {
}
// schedule welcome email(s)
- if($schedule_welcome_email && $new_subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
+ if ($schedule_welcome_email && $new_subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
$this->_scheduleWelcomeNotification($new_subscriber, $segments);
}
- if(!$skip_subscriber_notification) {
+ if (!$skip_subscriber_notification) {
$this->sendSubscriberNotification($new_subscriber, $segments);
}
}
@@ -242,14 +242,14 @@ class API {
function addList(array $list) {
// throw exception when list name is missing
- if(empty($list['name'])) {
+ if (empty($list['name'])) {
throw new \Exception(
__('List name is required.', 'mailpoet')
);
}
// throw exception when list already exists
- if(Segment::where('name', $list['name'])->findOne()) {
+ if (Segment::where('name', $list['name'])->findOne()) {
throw new \Exception(
__('This list already exists.', 'mailpoet')
);
@@ -259,7 +259,7 @@ class API {
$new_list = Segment::create();
$new_list->hydrate($list);
$new_list->save();
- if($new_list->getErrors() !== false) {
+ if ($new_list->getErrors() !== false) {
throw new \Exception(
__(sprintf('Failed to add list: %s', strtolower(implode(', ', $new_list->getErrors()))), 'mailpoet')
);
@@ -274,7 +274,7 @@ class API {
function getSubscriber($subscriber_email) {
$subscriber = Subscriber::findOne($subscriber_email);
// throw exception when subscriber does not exist
- if(!$subscriber) {
+ if (!$subscriber) {
throw new \Exception(__('This subscriber does not exist.', 'mailpoet'));
}
return $subscriber->withCustomFields()->withSubscriptions()->asArray();
@@ -286,9 +286,9 @@ class API {
protected function _scheduleWelcomeNotification(Subscriber $subscriber, array $segments) {
$result = Scheduler::scheduleSubscriberWelcomeNotification($subscriber->id, $segments);
- if(is_array($result)) {
+ if (is_array($result)) {
foreach ($result as $queue) {
- if($queue instanceof Sending && $queue->getErrors()) {
+ if ($queue instanceof Sending && $queue->getErrors()) {
throw new \Exception(
__(sprintf('Subscriber added, but welcome email failed to send: %s', strtolower(implode(', ', $queue->getErrors()))), 'mailpoet')
);
diff --git a/lib/Analytics/Analytics.php b/lib/Analytics/Analytics.php
index a6fd3b0db4..758b22d6ae 100644
--- a/lib/Analytics/Analytics.php
+++ b/lib/Analytics/Analytics.php
@@ -6,7 +6,7 @@ use Carbon\Carbon;
use MailPoet\WP\Functions as WPFunctions;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Analytics {
@@ -31,7 +31,7 @@ class Analytics {
/** @return array */
function generateAnalytics() {
- if($this->shouldSend()) {
+ if ($this->shouldSend()) {
$data = $this->wp->applyFilters(self::ANALYTICS_FILTER, $this->reporter->getData());
$this->recordDataSent();
return $data;
@@ -47,7 +47,7 @@ class Analytics {
static function setPublicId($new_public_id) {
$settings = new SettingsController();
$current_public_id = $settings->get('public_id');
- if($current_public_id !== $new_public_id) {
+ if ($current_public_id !== $new_public_id) {
$settings->set('public_id', $new_public_id);
$settings->set('new_public_id', 'true');
// Force user data to be resent
@@ -59,7 +59,7 @@ class Analytics {
function getPublicId() {
$public_id = $this->settings->get('public_id', '');
// if we didn't get the user public_id from the shop yet : we create one based on mixpanel distinct_id
- if(empty($public_id) && !empty($_COOKIE['mixpanel_distinct_id'])) {
+ if (empty($public_id) && !empty($_COOKIE['mixpanel_distinct_id'])) {
// the public id has to be diffent that mixpanel_distinct_id in order to be used on different browser
$mixpanel_distinct_id = md5($_COOKIE['mixpanel_distinct_id']);
$this->settings->set('public_id', $mixpanel_distinct_id);
@@ -75,7 +75,7 @@ class Analytics {
*/
function isPublicIdNew() {
$new_public_id = $this->settings->get('new_public_id');
- if($new_public_id === 'true') {
+ if ($new_public_id === 'true') {
$this->settings->set('new_public_id', 'false');
return true;
}
@@ -83,11 +83,11 @@ class Analytics {
}
private function shouldSend() {
- if(!$this->isEnabled()) {
+ if (!$this->isEnabled()) {
return false;
}
$lastSent = $this->settings->get(Analytics::SETTINGS_LAST_SENT_KEY);
- if(!$lastSent) {
+ if (!$lastSent) {
return true;
}
$lastSentCarbon = Carbon::createFromTimestamp(strtotime($lastSent))->addDays(Analytics::SEND_AFTER_DAYS);
diff --git a/lib/Analytics/Reporter.php b/lib/Analytics/Reporter.php
index a15c650891..1b0f0fdef1 100644
--- a/lib/Analytics/Reporter.php
+++ b/lib/Analytics/Reporter.php
@@ -33,7 +33,7 @@ class Reporter {
$segments = Segment::getAnalytics();
$has_wc = $this->woocommerce_helper->isWooCommerceActive();
$wc_customers_count = 0;
- if($has_wc) {
+ if ($has_wc) {
$wc_customers_count = (int)Newsletter::rawQuery(
"SELECT COUNT(DISTINCT m.meta_value) as count FROM ".$wpdb->prefix."posts p ".
"JOIN ".$wpdb->prefix."postmeta m ON m.post_id = p.id ".
diff --git a/lib/Config/AccessControl.php b/lib/Config/AccessControl.php
index d42897dfd4..b264e5e151 100644
--- a/lib/Config/AccessControl.php
+++ b/lib/Config/AccessControl.php
@@ -4,7 +4,7 @@ namespace MailPoet\Config;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class AccessControl {
const PERMISSION_ACCESS_PLUGIN_ADMIN = 'mailpoet_access_plugin_admin';
@@ -79,7 +79,7 @@ class AccessControl {
}
function validatePermission($permission) {
- if($permission === self::NO_ACCESS_RESTRICTION) return true;
+ if ($permission === self::NO_ACCESS_RESTRICTION) return true;
return current_user_can($permission);
}
}
diff --git a/lib/Config/Activator.php b/lib/Config/Activator.php
index 7fce3d9a33..f39ed456d3 100644
--- a/lib/Config/Activator.php
+++ b/lib/Config/Activator.php
@@ -4,7 +4,7 @@ namespace MailPoet\Config;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Activator {
diff --git a/lib/Config/Capabilities.php b/lib/Config/Capabilities.php
index bdf8c90f8f..989d241610 100644
--- a/lib/Config/Capabilities.php
+++ b/lib/Config/Capabilities.php
@@ -11,10 +11,10 @@ class Capabilities {
private $wp;
function __construct($renderer = null, WPFunctions $wp = null) {
- if($renderer !== null) {
+ if ($renderer !== null) {
$this->renderer = $renderer;
}
- if($wp == null) {
+ if ($wp == null) {
$wp = new WPFunctions;
}
$this->wp = $wp;
@@ -29,10 +29,10 @@ class Capabilities {
$role_objects = array();
foreach ($permissions as $name => $roles) {
foreach ($roles as $role) {
- if(!isset($role_objects[$role])) {
+ if (!isset($role_objects[$role])) {
$role_objects[$role] = get_role($role);
}
- if(!is_object($role_objects[$role])) continue;
+ if (!is_object($role_objects[$role])) continue;
$role_objects[$role]->add_cap($name);
}
}
@@ -43,10 +43,10 @@ class Capabilities {
$role_objects = array();
foreach ($permissions as $name => $roles) {
foreach ($roles as $role) {
- if(!isset($role_objects[$role])) {
+ if (!isset($role_objects[$role])) {
$role_objects[$role] = get_role($role);
}
- if(!is_object($role_objects[$role])) continue;
+ if (!is_object($role_objects[$role])) continue;
$role_objects[$role]->remove_cap($name);
}
}
diff --git a/lib/Config/Changelog.php b/lib/Config/Changelog.php
index f1842ffb4d..c71eab01cd 100644
--- a/lib/Config/Changelog.php
+++ b/lib/Config/Changelog.php
@@ -12,7 +12,7 @@ class Changelog {
/** @var SettingsController */
private $settings;
-
+
function __construct(SettingsController $settings, WPFunctions $wp) {
$this->settings = $settings;
$this->wp = $wp;
@@ -22,12 +22,12 @@ class Changelog {
$doing_ajax = (bool)(defined('DOING_AJAX') && DOING_AJAX);
// don't run any check when it's an ajax request
- if($doing_ajax) {
+ if ($doing_ajax) {
return;
}
// don't run any check when we're not on our pages
- if(
+ if (
!(isset($_GET['page']))
or
(isset($_GET['page']) && strpos($_GET['page'], 'mailpoet') !== 0)
@@ -46,13 +46,13 @@ class Changelog {
$redirect_url = null;
$mp2_migrator = new MP2Migrator();
- if(!in_array($_GET['page'], array('mailpoet-migration', 'mailpoet-settings')) && $mp2_migrator->isMigrationStartedAndNotCompleted()) {
+ if (!in_array($_GET['page'], array('mailpoet-migration', 'mailpoet-settings')) && $mp2_migrator->isMigrationStartedAndNotCompleted()) {
// Force the redirection if the migration has started but is not completed
$redirect_url = admin_url('admin.php?page=mailpoet-migration');
} else {
- if($version === null) {
+ if ($version === null) {
// new install
- if($mp2_migrator->isMigrationNeeded()) {
+ if ($mp2_migrator->isMigrationNeeded()) {
// Migration from MP2
$redirect_url = admin_url('admin.php?page=mailpoet-migration');
} else {
@@ -60,7 +60,7 @@ class Changelog {
$redirect_url = $skip_wizard ? null : admin_url('admin.php?page=mailpoet-welcome-wizard');
// ensure there was no MP2 migration (migration resets $version so it must be checked)
- if($this->settings->get('mailpoet_migration_started') === null) {
+ if ($this->settings->get('mailpoet_migration_started') === null) {
$this->settings->set('show_intro', true);
}
}
@@ -69,7 +69,7 @@ class Changelog {
}
}
- if($redirect_url !== null) {
+ if ($redirect_url !== null) {
// save version number
$this->settings->set('version', Env::$version);
diff --git a/lib/Config/Database.php b/lib/Config/Database.php
index d5c70d1d34..75c316fd80 100644
--- a/lib/Config/Database.php
+++ b/lib/Config/Database.php
@@ -4,7 +4,7 @@ namespace MailPoet\Config;
use ORM as ORM;
use PDO as PDO;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
@@ -34,9 +34,9 @@ class Database {
'sql_mode=(SELECT REPLACE(@@sql_mode,"ONLY_FULL_GROUP_BY",""))',
);
- if(!empty(Env::$db_charset)) {
+ if (!empty(Env::$db_charset)) {
$character_set = 'NAMES ' . Env::$db_charset;
- if(!empty(Env::$db_collation)) {
+ if (!empty(Env::$db_collation)) {
$character_set .= ' COLLATE ' . Env::$db_collation;
}
$driver_options[] = $character_set;
@@ -50,7 +50,7 @@ class Database {
$current_options = ORM::for_table("")
->raw_query('SELECT @@session.wait_timeout as wait_timeout')
->findOne();
- if($current_options && (int)$current_options->wait_timeout < $this->driver_option_wait_timeout) {
+ if ($current_options && (int)$current_options->wait_timeout < $this->driver_option_wait_timeout) {
ORM::raw_execute('SET SESSION wait_timeout = ' . $this->driver_option_wait_timeout);
}
} catch (\PDOException $e) {
@@ -60,7 +60,7 @@ class Database {
}
function defineTables() {
- if(!defined('MP_SETTINGS_TABLE')) {
+ if (!defined('MP_SETTINGS_TABLE')) {
$settings = Env::$db_prefix . 'settings';
$segments = Env::$db_prefix . 'segments';
$forms = Env::$db_prefix . 'forms';
diff --git a/lib/Config/DeactivationSurvey.php b/lib/Config/DeactivationSurvey.php
index 0a9c659f4a..d4eb8b667d 100644
--- a/lib/Config/DeactivationSurvey.php
+++ b/lib/Config/DeactivationSurvey.php
@@ -20,18 +20,18 @@ class DeactivationSurvey {
}
private function shouldShow() {
- if(!function_exists('get_current_screen')) {
+ if (!function_exists('get_current_screen')) {
return false;
}
$screen = get_current_screen();
- if(!is_object($screen)) {
+ if (!is_object($screen)) {
return false;
}
return (in_array(get_current_screen()->id, array('plugins', 'plugins-network'), true));
}
public function js() {
- if(!$this->shouldShow()) {
+ if (!$this->shouldShow()) {
return;
}
$this->render('deactivationSurvey/js.html');
@@ -39,14 +39,14 @@ class DeactivationSurvey {
}
public function css() {
- if(!$this->shouldShow()) {
+ if (!$this->shouldShow()) {
return;
}
$this->render('deactivationSurvey/css.html');
}
public function modal() {
- if(!$this->shouldShow()) {
+ if (!$this->shouldShow()) {
return;
}
$this->render('deactivationSurvey/index.html');
diff --git a/lib/Config/DeferredAdminNotices.php b/lib/Config/DeferredAdminNotices.php
index fbd5a88258..de05f26adf 100644
--- a/lib/Config/DeferredAdminNotices.php
+++ b/lib/Config/DeferredAdminNotices.php
@@ -28,7 +28,7 @@ class DeferredAdminNotices {
add_action('network_admin_notices', array($notice, 'displayWPNotice'));
}
- if(!empty($notices)) {
+ if (!empty($notices)) {
delete_option(DeferredAdminNotices::OPTIONS_KEY_NAME);
}
}
diff --git a/lib/Config/Env.php b/lib/Config/Env.php
index d2532017a1..63a8c5e16e 100644
--- a/lib/Config/Env.php
+++ b/lib/Config/Env.php
@@ -2,7 +2,7 @@
namespace MailPoet\Config;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Env {
const NEWSLETTER_CONTENT_WIDTH = 1320;
@@ -58,10 +58,10 @@ class Env {
self::$db_host = DB_HOST;
self::$db_port = 3306;
self::$db_socket = false;
- if(preg_match('/(?=:\d+$)/', DB_HOST)) {
+ if (preg_match('/(?=:\d+$)/', DB_HOST)) {
list(self::$db_host, self::$db_port) = explode(':', DB_HOST);
} else {
- if(preg_match('/:/', DB_HOST)) {
+ if (preg_match('/:/', DB_HOST)) {
self::$db_socket = true;
}
}
@@ -86,7 +86,7 @@ class Env {
'dbname=',
DB_NAME
);
- if(!empty($charset)) {
+ if (!empty($charset)) {
$source_name[] = ';charset=' . $charset;
}
return implode('', $source_name);
diff --git a/lib/Config/Hooks.php b/lib/Config/Hooks.php
index d4944fc032..236190ab19 100644
--- a/lib/Config/Hooks.php
+++ b/lib/Config/Hooks.php
@@ -46,12 +46,12 @@ class Hooks {
$subscribe = $this->settings->get('subscribe', []);
// Subscribe in comments
- if(
+ if (
isset($subscribe['on_comment']['enabled'])
&&
(bool)$subscribe['on_comment']['enabled']
) {
- if($this->wp->isUserLoggedIn()) {
+ if ($this->wp->isUserLoggedIn()) {
$this->wp->addAction(
'comment_form_field_comment',
'\MailPoet\Subscription\Comment::extendLoggedInForm'
@@ -79,12 +79,12 @@ class Hooks {
}
// Subscribe in registration form
- if(
+ if (
isset($subscribe['on_register']['enabled'])
&&
(bool)$subscribe['on_register']['enabled']
) {
- if(is_multisite()) {
+ if (is_multisite()) {
$this->wp->addAction(
'signup_extra_fields',
'\MailPoet\Subscription\Registration::extendForm'
@@ -217,7 +217,7 @@ class Hooks {
}
function setScreenOption($status, $option, $value) {
- if(preg_match('/^mailpoet_(.*)_per_page$/', $option)) {
+ if (preg_match('/^mailpoet_(.*)_per_page$/', $option)) {
return $value;
} else {
return $status;
diff --git a/lib/Config/Initializer.php b/lib/Config/Initializer.php
index bfeb0fe156..7e0386a270 100644
--- a/lib/Config/Initializer.php
+++ b/lib/Config/Initializer.php
@@ -14,7 +14,7 @@ use MailPoet\Util\Notices\PermanentNotices;
use MailPoet\WP\Notice as WPNotice;
use MailPoetVendor\Psr\Container\ContainerInterface;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
@@ -36,7 +36,7 @@ class Initializer {
function init() {
$requirements_check_results = $this->checkRequirements();
- if(!$requirements_check_results[RequirementsChecker::TEST_PDO_EXTENSION] ||
+ if (!$requirements_check_results[RequirementsChecker::TEST_PDO_EXTENSION] ||
!$requirements_check_results[RequirementsChecker::TEST_VENDOR_SOURCE]
) {
return;
@@ -173,7 +173,7 @@ class Initializer {
}
// if current db version and plugin version differ
- if(version_compare($current_db_version, Env::$version) !== 0) {
+ if (version_compare($current_db_version, Env::$version) !== 0) {
$this->runActivator();
}
}
@@ -192,7 +192,7 @@ class Initializer {
function setupUpdater() {
$slug = Installer::PREMIUM_PLUGIN_SLUG;
$plugin_file = Installer::getPluginFile($slug);
- if(empty($plugin_file) || !defined('MAILPOET_PREMIUM_VERSION')) {
+ if (empty($plugin_file) || !defined('MAILPOET_PREMIUM_VERSION')) {
return false;
}
$updater = new Updater(
@@ -234,7 +234,7 @@ class Initializer {
function setupCronTrigger() {
// setup cron trigger only outside of cli environment
- if(php_sapi_name() !== 'cli') {
+ if (php_sapi_name() !== 'cli') {
$cron_trigger = $this->container->get(CronTrigger::class);
$cron_trigger->init();
}
@@ -246,7 +246,7 @@ class Initializer {
}
function postInitialize() {
- if(!defined(self::INITIALIZED)) return;
+ if (!defined(self::INITIALIZED)) return;
try {
$this->setupHooks();
$this->setupJSONAPI();
@@ -267,7 +267,7 @@ class Initializer {
}
function setupUserLocale() {
- if(get_user_locale() === get_locale()) return;
+ if (get_user_locale() === get_locale()) return;
unload_textdomain(Env::$plugin_name);
$localizer = new Localizer();
$localizer->init();
@@ -304,7 +304,7 @@ class Initializer {
function handleFailedInitialization($exception) {
// check if we are able to add pages at this point
- if(function_exists('wp_get_current_user')) {
+ if (function_exists('wp_get_current_user')) {
Menu::addErrorPage($this->access_control);
}
return WPNotice::displayError($exception);
diff --git a/lib/Config/Installer.php b/lib/Config/Installer.php
index e45406d1ef..088544da9a 100644
--- a/lib/Config/Installer.php
+++ b/lib/Config/Installer.php
@@ -7,7 +7,7 @@ use MailPoet\Services\Release\API;
use MailPoet\Settings\SettingsController;
use MailPoet\Util\License\License;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Installer {
const PREMIUM_PLUGIN_SLUG = 'mailpoet-premium';
@@ -27,7 +27,7 @@ class Installer {
}
function getPluginInformation($data, $action = '', $args = null) {
- if($action === 'plugin_information'
+ if ($action === 'plugin_information'
&& isset($args->slug)
&& $args->slug === $this->slug
) {
@@ -72,7 +72,7 @@ class Installer {
static function getPluginActivationUrl($slug) {
$plugin_file = self::getPluginFile($slug);
- if(empty($plugin_file)) {
+ if (empty($plugin_file)) {
return false;
}
$activate_url = add_query_arg(
@@ -88,7 +88,7 @@ class Installer {
private static function getInstalledPlugin($slug) {
$installed_plugin = array();
- if(is_dir(WP_PLUGIN_DIR . '/' . $slug)) {
+ if (is_dir(WP_PLUGIN_DIR . '/' . $slug)) {
$installed_plugin = get_plugins('/' . $slug);
}
return $installed_plugin;
@@ -97,7 +97,7 @@ class Installer {
static function getPluginFile($slug) {
$plugin_file = false;
$installed_plugin = self::getInstalledPlugin($slug);
- if(!empty($installed_plugin)) {
+ if (!empty($installed_plugin)) {
$plugin_file = $slug . '/' . key($installed_plugin);
}
return $plugin_file;
@@ -113,7 +113,7 @@ class Installer {
private function formatInformation($info) {
// cast sections object to array for WP to understand
- if(isset($info->sections)) {
+ if (isset($info->sections)) {
$info->sections = (array)$info->sections;
}
return $info;
diff --git a/lib/Config/Localizer.php b/lib/Config/Localizer.php
index 2e6dcc011e..8ef9a2452e 100644
--- a/lib/Config/Localizer.php
+++ b/lib/Config/Localizer.php
@@ -2,7 +2,7 @@
namespace MailPoet\Config;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Localizer {
function init() {
diff --git a/lib/Config/MP2Migrator.php b/lib/Config/MP2Migrator.php
index 04c869441a..fad421971f 100644
--- a/lib/Config/MP2Migrator.php
+++ b/lib/Config/MP2Migrator.php
@@ -13,7 +13,7 @@ use MailPoet\Settings\SettingsController;
use MailPoet\Util\Notices\AfterMigrationNotice;
use MailPoet\Util\ProgressBar;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class MP2Migrator {
const IMPORT_TIMEOUT_IN_SECONDS = 7200; // Timeout = 2 hours
@@ -93,7 +93,7 @@ class MP2Migrator {
* @return boolean
*/
public function isMigrationNeeded() {
- if($this->settings->get('mailpoet_migration_complete')) {
+ if ($this->settings->get('mailpoet_migration_complete')) {
return false;
} else {
return $this->tableExists($this->mp2_campaign_table); // Check if the MailPoet 2 tables exist
@@ -133,7 +133,7 @@ class MP2Migrator {
*
*/
public function init() {
- if(!$this->settings->get('mailpoet_migration_started', false)) {
+ if (!$this->settings->get('mailpoet_migration_started', false)) {
$this->emptyLog();
$this->progressbar->setTotalCount(0);
}
@@ -163,7 +163,7 @@ class MP2Migrator {
* @return string Result
*/
public function import() {
- if(strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
@set_time_limit(3600);
}
ob_start();
@@ -171,7 +171,7 @@ class MP2Migrator {
$this->log(sprintf('=== ' . mb_strtoupper(__('Start import', 'mailpoet'), 'UTF-8') . ' %s ===', $datetime->formatTime(time(), \MailPoet\WP\DateTime::DEFAULT_DATE_TIME_FORMAT)));
$this->settings->set('import_stopped', false); // Reset the stop import action
- if(!$this->settings->get('mailpoet_migration_started', false)) {
+ if (!$this->settings->get('mailpoet_migration_started', false)) {
$this->eraseMP3Data();
$this->settings->set('mailpoet_migration_started', true);
$this->displayDataToMigrate();
@@ -185,7 +185,7 @@ class MP2Migrator {
$this->importForms();
$this->importSettings();
- if(!$this->importStopped()) {
+ if (!$this->importStopped()) {
$this->settings->set('mailpoet_migration_complete', true);
$this->log(mb_strtoupper(__('Import complete', 'mailpoet'), 'UTF-8'));
$after_migration_notice = new AfterMigrationNotice();
@@ -233,7 +233,7 @@ class MP2Migrator {
private function loadDoubleOptinSettings() {
$encoded_option = get_option('wysija');
$values = unserialize(base64_decode($encoded_option));
- if(isset($values['confirm_dbleoptin']) && $values['confirm_dbleoptin'] === '0') {
+ if (isset($values['confirm_dbleoptin']) && $values['confirm_dbleoptin'] === '0') {
$this->double_optin_enabled = false;
}
}
@@ -315,22 +315,22 @@ class MP2Migrator {
*/
private function importSegments() {
$imported_segments_count = 0;
- if($this->importStopped()) {
+ if ($this->importStopped()) {
$this->segments_mapping = $this->getImportedMapping('segments');
return;
}
$this->log(__("Importing segments...", 'mailpoet'));
do {
- if($this->importStopped()) {
+ if ($this->importStopped()) {
break;
}
$lists = $this->getLists(self::CHUNK_SIZE);
$lists_count = count($lists);
- if(is_array($lists)) {
+ if (is_array($lists)) {
foreach ($lists as $list) {
$segment = $this->importSegment($list);
- if(!empty($segment)) {
+ if (!empty($segment)) {
$imported_segments_count++;
}
}
@@ -376,7 +376,7 @@ class MP2Migrator {
*/
private function importSegment($list_data) {
$datetime = new \MailPoet\WP\DateTime();
- if($list_data['is_enabled']) {
+ if ($list_data['is_enabled']) {
$segment = Segment::createOrUpdate(array(
'name' => $list_data['name'],
'type' => 'default',
@@ -386,7 +386,7 @@ class MP2Migrator {
} else {
$segment = Segment::getWPSegment();
}
- if(!empty($segment)) {
+ if (!empty($segment)) {
// Map the segment with its old ID
$mapping = new MappingToExternalEntities();
$mapping->create(array(
@@ -406,7 +406,7 @@ class MP2Migrator {
*/
private function importCustomFields() {
$imported_custom_fields_count = 0;
- if($this->importStopped()) {
+ if ($this->importStopped()) {
return;
}
$this->log(__("Importing custom fields...", 'mailpoet'));
@@ -414,7 +414,7 @@ class MP2Migrator {
foreach ($custom_fields as $custom_field) {
$result = $this->importCustomField($custom_field);
- if(!empty($result)) {
+ if (!empty($result)) {
$imported_custom_fields_count++;
}
}
@@ -489,20 +489,20 @@ class MP2Migrator {
* @return string serialized MP3 custom field params
*/
private function mapCustomFieldParams($name, $params) {
- if(!isset($params['label'])) {
+ if (!isset($params['label'])) {
$params['label'] = $name;
}
- if(isset($params['required'])) {
+ if (isset($params['required'])) {
$params['required'] = (bool)$params['required'];
}
- if(isset($params['validate'])) {
+ if (isset($params['validate'])) {
$params['validate'] = $this->mapCustomFieldValidateValue($params['validate']);
}
- if(isset($params['date_order'])) { // Convert the date_order field
+ if (isset($params['date_order'])) { // Convert the date_order field
switch ($params['date_type']) {
case 'year_month':
- if(preg_match('/y$/i', $params['date_order'])) {
+ if (preg_match('/y$/i', $params['date_order'])) {
$params['date_format'] = 'MM/YYYY';
} else {
$params['date_format'] = 'YYYY/MM';
@@ -554,22 +554,22 @@ class MP2Migrator {
*/
private function importSubscribers() {
$imported_subscribers_count = 0;
- if($this->importStopped()) {
+ if ($this->importStopped()) {
return;
}
$this->log(__("Importing subscribers...", 'mailpoet'));
$this->wp_users_segment = Segment::getWPSegment();
do {
- if($this->importStopped()) {
+ if ($this->importStopped()) {
break;
}
$users = $this->getUsers(self::CHUNK_SIZE);
$users_count = count($users);
- if(is_array($users)) {
+ if (is_array($users)) {
foreach ($users as $user) {
$subscriber = $this->importSubscriber($user);
- if(!empty($subscriber)) {
+ if (!empty($subscriber)) {
$imported_subscribers_count++;
$this->importSubscriberSegments($subscriber, $user['user_id']);
$this->importSubscriberCustomFields($subscriber, $user);
@@ -626,7 +626,7 @@ class MP2Migrator {
'confirmed_at' => !empty($user_data['confirmed_at']) ? $datetime->formatTime($user_data['confirmed_at'], \MailPoet\WP\DateTime::DEFAULT_DATE_TIME_FORMAT) : null,
));
$this->settings->set('last_imported_user_id', $user_data['user_id']);
- if(!empty($subscriber)) {
+ if (!empty($subscriber)) {
// Map the subscriber with its old ID
$mapping = new MappingToExternalEntities();
$mapping->create(array(
@@ -658,7 +658,7 @@ class MP2Migrator {
case 0:
default:
//if MP2 double-optin is disabled, we change "unconfirmed" status in MP2 to "confirmed" status in MP3.
- if(!$this->double_optin_enabled) {
+ if (!$this->double_optin_enabled) {
$status = 'subscribed';
} else {
$status = 'unconfirmed';
@@ -712,7 +712,7 @@ class MP2Migrator {
private function importSubscriberSegment($subscriber_id, $user_list) {
$subscriber_segment = null;
$datetime = new \MailPoet\WP\DateTime();
- if(isset($this->segments_mapping[$user_list['list_id']])) {
+ if (isset($this->segments_mapping[$user_list['list_id']])) {
$segment_id = $this->segments_mapping[$user_list['list_id']];
$status = (($segment_id == $this->wp_users_segment->id) || empty($user_list['unsub_date'])) ? 'subscribed' : 'unsubscribed'; // the users belonging to the wp_users segment are always subscribed
$data = array(
@@ -769,7 +769,7 @@ class MP2Migrator {
* @return SubscriberCustomField
*/
private function importSubscriberCustomField($subscriber_id, $custom_field, $custom_field_value) {
- if($custom_field['type'] == 'date') {
+ if ($custom_field['type'] == 'date') {
$datetime = new \MailPoet\WP\DateTime();
$value = $datetime->formatTime($custom_field_value, \MailPoet\WP\DateTime::DEFAULT_DATE_TIME_FORMAT); // Convert the date field
} else {
@@ -806,21 +806,21 @@ class MP2Migrator {
*/
private function importForms() {
$imported_forms_count = 0;
- if($this->importStopped()) {
+ if ($this->importStopped()) {
return;
}
$this->log(__("Importing forms...", 'mailpoet'));
do {
- if($this->importStopped()) {
+ if ($this->importStopped()) {
break;
}
$forms = $this->getForms(self::CHUNK_SIZE);
$forms_count = count($forms);
- if(is_array($forms)) {
+ if (is_array($forms)) {
foreach ($forms as $form) {
$new_form = $this->importForm($form);
- if(!empty($new_form)) {
+ if (!empty($new_form)) {
$imported_forms_count++;
}
}
@@ -878,7 +878,7 @@ class MP2Migrator {
$mp3_form_body = array();
foreach ($body as $field) {
$type = $this->mapCustomFieldType($field['type']);
- if($type == 'segment') {
+ if ($type == 'segment') {
$field_id = 'segments';
} else {
switch ($field['field']) {
@@ -894,10 +894,10 @@ class MP2Migrator {
}
$field_id = preg_replace('/^cf_(\d+)$/', '$1', $field_id);
$params = $this->mapCustomFieldParams($field['name'], $field['params']);
- if(isset($params['text'])) {
+ if (isset($params['text'])) {
$params['text'] = $this->replaceMP2Shortcodes(html_entity_decode($params['text']));
}
- if(isset($params['values'])) {
+ if (isset($params['values'])) {
$params['values'] = $this->replaceListIds($params['values']);
}
$mp3_form_body[] = array(
@@ -928,7 +928,7 @@ class MP2Migrator {
private function getMappedSegmentIds($mp2_list_ids) {
$mp3_segment_ids = array();
foreach ($mp2_list_ids as $list_id) {
- if(isset($this->segments_mapping[$list_id])) {
+ if (isset($this->segments_mapping[$list_id])) {
$mp3_segment_ids[] = $this->segments_mapping[$list_id];
}
}
@@ -954,7 +954,7 @@ class MP2Migrator {
* @return string Replacement
*/
private function replaceMP2ShortcodesCallback($matches) {
- if(!empty($matches)) {
+ if (!empty($matches)) {
$mp2_lists = explode(',', $matches[1]);
$segments = $this->getMappedSegmentIds($mp2_lists);
$segments_ids = implode(',', $segments);
@@ -973,18 +973,18 @@ class MP2Migrator {
foreach ($values as $value) {
$mp3_value = array();
foreach ($value as $item => $item_value) {
- if(($item == 'list_id') && isset($this->segments_mapping[$item_value])) {
+ if (($item == 'list_id') && isset($this->segments_mapping[$item_value])) {
$segment_id = $this->segments_mapping[$item_value];
$mp3_value['id'] = $segment_id;
$segment = Segment::findOne($segment_id);
- if($segment) {
+ if ($segment) {
$mp3_value['name'] = $segment->get('name');
}
} else {
$mp3_value[$item] = $item_value;
}
}
- if(!empty($mp3_value)) {
+ if (!empty($mp3_value)) {
$mp3_values[] = $mp3_value;
}
}
@@ -1042,10 +1042,10 @@ class MP2Migrator {
// Confirmation email
$signup_confirmation = $this->settings->get('signup_confirmation');
$signup_confirmation['enabled'] = isset($options['confirm_dbleoptin']) && ($options['confirm_dbleoptin'] == 0) ? 0 : 1;
- if(isset($options['confirm_email_id'])) {
+ if (isset($options['confirm_email_id'])) {
$confirm_email_id = $options['confirm_email_id'];
$confirm_email = $this->getEmail($confirm_email_id);
- if(!empty($confirm_email)) {
+ if (!empty($confirm_email)) {
$signup_confirmation['from']['name'] = isset($confirm_email['from_name']) ? $confirm_email['from_name'] : '';
$signup_confirmation['from']['address'] = isset($confirm_email['from_email']) ? $confirm_email['from_email'] : '';
$signup_confirmation['reply_to']['name'] = isset($confirm_email['replyto_name']) ? $confirm_email['replyto_name'] : '';
@@ -1080,12 +1080,12 @@ class MP2Migrator {
$this->settings->set('mta', $mta);
// SMTP Provider
- if($mta['method'] == 'SendGrid') {
+ if ($mta['method'] == 'SendGrid') {
$this->settings->set('smtp_provider', 'SendGrid');
}
// Installation date
- if(isset($options['installed_time'])) {
+ if (isset($options['installed_time'])) {
$datetime = new \MailPoet\WP\DateTime();
$installed_at = $datetime->formatTime($options['installed_time'], \MailPoet\WP\DateTime::DEFAULT_DATE_TIME_FORMAT);
$this->settings->set('installed_at', $installed_at);
@@ -1154,7 +1154,7 @@ class MP2Migrator {
* @return int Emails number
*/
private function mapFrequencyEmails($emails_number, $interval_str) {
- if(empty($emails_number)) {
+ if (empty($emails_number)) {
$emails_number = 70;
} else {
switch ($interval_str) {
diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php
index 6e6644d962..3e26b7dc13 100644
--- a/lib/Config/Menu.php
+++ b/lib/Config/Menu.php
@@ -31,7 +31,7 @@ use MailPoet\WP\Notice as WPNotice;
use MailPoet\WP\Readme;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Menu {
const MAIN_PAGE_SLUG = 'mailpoet-newsletters';
@@ -84,12 +84,12 @@ class Menu {
}
function setup() {
- if(!$this->access_control->validatePermission(AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN)) return;
- if(self::isOnMailPoetAdminPage()) {
+ if (!$this->access_control->validatePermission(AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN)) return;
+ if (self::isOnMailPoetAdminPage()) {
do_action('mailpoet_conflict_resolver_styles');
do_action('mailpoet_conflict_resolver_scripts');
- if($_REQUEST['page'] === 'mailpoet-newsletter-editor') {
+ if ($_REQUEST['page'] === 'mailpoet-newsletter-editor') {
// Disable WP emojis to not interfere with the newsletter editor emoji handling
$this->disableWPEmojis();
add_action('admin_head', function() {
@@ -373,7 +373,7 @@ class Menu {
}
function welcomeWizard() {
- if((bool)(defined('DOING_AJAX') && DOING_AJAX)) return;
+ if ((bool)(defined('DOING_AJAX') && DOING_AJAX)) return;
$data = [
'is_mp2_migration_complete' => (bool)$this->settings->get('mailpoet_migration_complete'),
'is_woocommerce_active' => $this->woocommerce_helper->isWooCommerceActive(),
@@ -392,7 +392,7 @@ class Menu {
? urldecode($_GET['mailpoet_redirect'])
: wp_get_referer();
- if(
+ if (
$redirect_url === $current_url
or
strpos($redirect_url, 'mailpoet') === false
@@ -409,7 +409,7 @@ class Menu {
$data['is_new_user'] = true;
$data['is_old_user'] = false;
- if(!empty($data['settings']['installed_at'])) {
+ if (!empty($data['settings']['installed_at'])) {
$installed_at = Carbon::createFromTimestamp(strtotime($data['settings']['installed_at']));
$current_time = Carbon::createFromTimestamp($this->wp->currentTime('timestamp'));
$data['is_new_user'] = $current_time->diffInDays($installed_at) <= 30;
@@ -418,9 +418,9 @@ class Menu {
}
$readme_file = Env::$path . '/readme.txt';
- if(is_readable($readme_file)) {
+ if (is_readable($readme_file)) {
$changelog = Readme::parseChangelog(file_get_contents($readme_file), 1);
- if($changelog) {
+ if ($changelog) {
$data['changelog'] = $changelog;
}
}
@@ -508,7 +508,7 @@ class Menu {
// flags (available features on WP install)
$flags = array();
- if(is_multisite()) {
+ if (is_multisite()) {
// get multisite registration option
$registration = apply_filters(
'wpmu_registration_enabled',
@@ -544,7 +544,7 @@ class Menu {
$data['custom_fields'] = array_map(function($field) {
$field['params'] = unserialize($field['params']);
- if(!empty($field['params']['values'])) {
+ if (!empty($field['params']['values'])) {
$values = array();
foreach ($field['params']['values'] as $value) {
@@ -571,7 +571,7 @@ class Menu {
}
function forms() {
- if($this->subscribers_over_limit) return $this->displaySubscriberLimitExceededTemplate();
+ if ($this->subscribers_over_limit) return $this->displaySubscriberLimitExceededTemplate();
$data = array();
@@ -584,8 +584,8 @@ class Menu {
}
function newsletters() {
- if($this->subscribers_over_limit) return $this->displaySubscriberLimitExceededTemplate();
- if(isset($this->mp_api_key_valid) && $this->mp_api_key_valid === false) {
+ if ($this->subscribers_over_limit) return $this->displaySubscriberLimitExceededTemplate();
+ if (isset($this->mp_api_key_valid) && $this->mp_api_key_valid === false) {
return $this->displayMailPoetAPIKeyInvalidTemplate();
}
@@ -732,7 +732,7 @@ class Menu {
function formEditor() {
$id = (isset($_GET['id']) ? (int)$_GET['id'] : 0);
$form = Form::findOne($id);
- if($form !== false) {
+ if ($form !== false) {
$form = $form->asArray();
}
@@ -773,15 +773,15 @@ class Menu {
}
static function isOnMailPoetAdminPage(array $exclude = null, $screen_id = null) {
- if(is_null($screen_id)) {
- if(empty($_REQUEST['page'])) {
+ if (is_null($screen_id)) {
+ if (empty($_REQUEST['page'])) {
return false;
}
$screen_id = $_REQUEST['page'];
}
- if(!empty($exclude)) {
+ if (!empty($exclude)) {
foreach ($exclude as $slug) {
- if(stripos($screen_id, $slug) !== false) {
+ if (stripos($screen_id, $slug) !== false) {
return false;
}
}
@@ -794,11 +794,11 @@ class Menu {
* to display admin notices only
*/
static function addErrorPage(AccessControl $access_control) {
- if(!self::isOnMailPoetAdminPage()) {
+ if (!self::isOnMailPoetAdminPage()) {
return false;
}
// Check if page already exists
- if(get_plugin_page_hook($_REQUEST['page'], '')
+ if (get_plugin_page_hook($_REQUEST['page'], '')
|| get_plugin_page_hook($_REQUEST['page'], self::MAIN_PAGE_SLUG)
) {
return false;
@@ -821,7 +821,7 @@ class Menu {
}
function checkMailPoetAPIKey(ServicesChecker $checker = null) {
- if(self::isOnMailPoetAdminPage()) {
+ if (self::isOnMailPoetAdminPage()) {
$show_notices = isset($_REQUEST['page'])
&& stripos($_REQUEST['page'], self::MAIN_PAGE_SLUG) === false;
$checker = $checker ?: new ServicesChecker();
@@ -837,7 +837,7 @@ class Menu {
}
function getLimitPerPage($model = null) {
- if($model === null) {
+ if ($model === null) {
return Listing\Handler::DEFAULT_LIMIT_PER_PAGE;
}
@@ -860,7 +860,7 @@ class Menu {
function isNewUser() {
$installed_at = $this->settings->get('installed_at');
- if(is_null($installed_at)) {
+ if (is_null($installed_at)) {
return true;
}
$installed_at = Carbon::createFromTimestamp(strtotime($installed_at));
diff --git a/lib/Config/Migrator.php b/lib/Config/Migrator.php
index 53da64502b..c32a3da52a 100644
--- a/lib/Config/Migrator.php
+++ b/lib/Config/Migrator.php
@@ -5,7 +5,7 @@ use MailPoet\Models\Subscriber;
use MailPoet\Models\Newsletter;
use MailPoet\Util\Helpers;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
diff --git a/lib/Config/PluginActivatedHook.php b/lib/Config/PluginActivatedHook.php
index 4a50354fa2..9daa1b228c 100644
--- a/lib/Config/PluginActivatedHook.php
+++ b/lib/Config/PluginActivatedHook.php
@@ -10,8 +10,8 @@ class PluginActivatedHook {
}
public function action($plugin, $network_wide) {
- if($plugin === plugin_basename(Env::$file) && $network_wide) {
+ if ($plugin === plugin_basename(Env::$file) && $network_wide) {
$this->deferred_admin_notices->addNetworkAdminNotice(__("We noticed that you're using an unsupported environment. While MailPoet might work within a MultiSite environment, we don’t support it.", 'mailpoet'));
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php
index 58235cff90..0c36a8e085 100644
--- a/lib/Config/Populator.php
+++ b/lib/Config/Populator.php
@@ -16,7 +16,7 @@ use MailPoet\Subscribers\NewSubscriberNotificationMailer;
use MailPoet\Subscribers\Source;
use MailPoet\Util\Helpers;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
@@ -93,7 +93,7 @@ class Populator {
'Fitness',
'KidsClothing',
'Avocado',
-
+
'FashionBlogA',
'FashionShop',
'LifestyleBlogA',
@@ -129,21 +129,21 @@ class Populator {
));
$page = null;
- if(!empty($pages)) {
+ if (!empty($pages)) {
$page = array_shift($pages);
- if(strpos($page->post_content, '[mailpoet_page]') === false) {
+ if (strpos($page->post_content, '[mailpoet_page]') === false) {
$page = null;
}
}
- if($page === null) {
+ if ($page === null) {
$mailpoet_page_id = Pages::createMailPoetPage();
} else {
$mailpoet_page_id = (int)$page->ID;
}
$subscription = $this->settings->get('subscription.pages', array());
- if(empty($subscription)) {
+ if (empty($subscription)) {
$this->settings->set('subscription.pages', array(
'unsubscribe' => $mailpoet_page_id,
'manage' => $mailpoet_page_id,
@@ -156,7 +156,7 @@ class Populator {
$current_user = wp_get_current_user();
// set cron trigger option to default method
- if(!$this->settings->fetch(CronTrigger::SETTING_NAME)) {
+ if (!$this->settings->fetch(CronTrigger::SETTING_NAME)) {
$this->settings->set(CronTrigger::SETTING_NAME, array(
'method' => CronTrigger::DEFAULT_METHOD
));
@@ -169,12 +169,12 @@ class Populator {
);
// set default from name & address
- if(!$this->settings->fetch('sender')) {
+ if (!$this->settings->fetch('sender')) {
$this->settings->set('sender', $sender);
}
// enable signup confirmation by default
- if(!$this->settings->fetch('signup_confirmation')) {
+ if (!$this->settings->fetch('signup_confirmation')) {
$this->settings->set('signup_confirmation', array(
'enabled' => true,
'from' => array(
@@ -186,13 +186,13 @@ class Populator {
}
// set installation date
- if(!$this->settings->fetch('installed_at')) {
+ if (!$this->settings->fetch('installed_at')) {
$this->settings->set('installed_at', date("Y-m-d H:i:s"));
}
// set reCaptcha settings
$re_captcha = $this->settings->fetch('re_captcha');
- if(empty($re_captcha)) {
+ if (empty($re_captcha)) {
$this->settings->set('re_captcha', array(
'enabled' => false,
'site_token' => '',
@@ -201,7 +201,7 @@ class Populator {
}
$subscriber_email_notification = $this->settings->fetch(NewSubscriberNotificationMailer::SETTINGS_KEY);
- if(empty($subscriber_email_notification)) {
+ if (empty($subscriber_email_notification)) {
$sender = $this->settings->fetch('sender', []);
$this->settings->set('subscriber_email_notification', [
'enabled' => true,
@@ -210,7 +210,7 @@ class Populator {
}
$stats_notifications = $this->settings->fetch('stats_notifications');
- if(empty($stats_notifications)) {
+ if (empty($stats_notifications)) {
$sender = $this->settings->fetch('sender', []);
$this->settings->set('stats_notifications', [
'enabled' => true,
@@ -232,7 +232,7 @@ class Populator {
WP::synchronizeUsers();
// Default segment
- if(Segment::where('type', 'default')->count() === 0) {
+ if (Segment::where('type', 'default')->count() === 0) {
$this->default_segment = Segment::create();
$this->default_segment->hydrate([
'name' => __('My First List', 'mailpoet'),
@@ -244,9 +244,9 @@ class Populator {
}
private function createDefaultForm() {
- if(Form::count() === 0) {
+ if (Form::count() === 0) {
$factory = new DefaultForm();
- if(!$this->default_segment) {
+ if (!$this->default_segment) {
$this->default_segment = Segment::where('type', 'default')->orderByAsc('id')->limit(1)->findOne();
}
Form::createOrUpdate([
@@ -357,10 +357,10 @@ class Populator {
$identification_columns
);
- if(!$this->rowExists($table, $existence_comparison_fields)) {
+ if (!$this->rowExists($table, $existence_comparison_fields)) {
$this->insertRow($table, $row);
} else {
- if($remove_duplicates) {
+ if ($remove_duplicates) {
$this->removeDuplicates($table, $row, $existence_comparison_fields);
}
$this->updateRow($table, $row, $existence_comparison_fields);
@@ -446,7 +446,7 @@ 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', '>')) {
+ 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\"')";
diff --git a/lib/Config/PopulatorData/Templates/AppWelcome.php b/lib/Config/PopulatorData/Templates/AppWelcome.php
index 589339c10e..03efbad4e7 100644
--- a/lib/Config/PopulatorData/Templates/AppWelcome.php
+++ b/lib/Config/PopulatorData/Templates/AppWelcome.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#125674',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -107,20 +107,20 @@ class BookStoreWithCoupon {
'fullWidth' => false,
'width' => '200px',
'height' => '48px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -131,68 +131,68 @@ class BookStoreWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Book-Header.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#125674',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '100px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => '
Turn more pages this weekend...
Just to say thanks, here\'s a small gift from us to you.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '71px',
@@ -203,50 +203,50 @@ class BookStoreWithCoupon {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Book-Body-2.png',
'display' => 'tile',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -255,38 +255,38 @@ class BookStoreWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '21px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Read more every week
@@ -294,31 +294,31 @@ class BookStoreWithCoupon {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -329,50 +329,50 @@ class BookStoreWithCoupon {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Book-Body-2.png',
'display' => 'tile',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '2px',
@@ -386,76 +386,76 @@ class BookStoreWithCoupon {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Book-Body-2.png',
'display' => 'tile',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, adipiscing elit. Fusce mollis orci justo,
commodo mattis nisi vitae. Sed aliquam, ex ac lacinia tempus,
enim urna luctus odio, at leo ante non.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'text',
'text' => '20% off all books ',
),
- 3 =>
+ 3 =>
array (
'type' => 'button',
'text' => 'Coupon_Code',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'borderColor' => '#125674',
@@ -472,7 +472,7 @@ class BookStoreWithCoupon {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'image',
'link' => '',
@@ -481,9 +481,9 @@ class BookStoreWithCoupon {
'fullWidth' => true,
'width' => '1200px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -493,50 +493,50 @@ class BookStoreWithCoupon {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#cdc391',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -547,51 +547,51 @@ class BookStoreWithCoupon {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#cdc391',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -605,32 +605,32 @@ class BookStoreWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -644,32 +644,32 @@ class BookStoreWithCoupon {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -685,50 +685,50 @@ class BookStoreWithCoupon {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#125674',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '29px',
@@ -739,45 +739,45 @@ class BookStoreWithCoupon {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#125674',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -786,56 +786,56 @@ class BookStoreWithCoupon {
'fullWidth' => false,
'width' => '96px',
'height' => '48px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'header',
'text' => 'Open this email in your web browser.
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
@@ -848,49 +848,49 @@ class BookStoreWithCoupon {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Noticia Text',
'fontSize' => '14px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Playfair Display',
'fontSize' => '30px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Playfair Display',
'fontSize' => '22px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Arial',
'fontSize' => '20px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759B',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#125674',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -908,14 +908,14 @@ class BookStoreWithCoupon {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -934,12 +934,12 @@ class BookStoreWithCoupon {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -952,7 +952,7 @@ class BookStoreWithCoupon {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '5',
'withLayout' => true,
@@ -970,14 +970,14 @@ class BookStoreWithCoupon {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -996,12 +996,12 @@ class BookStoreWithCoupon {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1014,13 +1014,13 @@ class BookStoreWithCoupon {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Coupon_Code',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'borderColor' => '#125674',
@@ -1038,11 +1038,11 @@ class BookStoreWithCoupon {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '2px',
@@ -1053,23 +1053,23 @@ class BookStoreWithCoupon {
),
'type' => 'divider',
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1077,7 +1077,7 @@ class BookStoreWithCoupon {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1096,14 +1096,14 @@ class BookStoreWithCoupon {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1122,12 +1122,12 @@ class BookStoreWithCoupon {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1140,12 +1140,12 @@ class BookStoreWithCoupon {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1158,11 +1158,11 @@ class BookStoreWithCoupon {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -1170,23 +1170,23 @@ class BookStoreWithCoupon {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/Charity.php b/lib/Config/PopulatorData/Templates/Charity.php
index 66b5f7c2de..470a5013b9 100644
--- a/lib/Config/PopulatorData/Templates/Charity.php
+++ b/lib/Config/PopulatorData/Templates/Charity.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '27px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'header',
'text' => 'Open this email in your web browser.
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '11px',
'textAlign' => 'left',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#e2973f',
'textDecoration' => 'underline',
@@ -126,57 +126,57 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -185,9 +185,9 @@ class ClearNews {
'fullWidth' => false,
'width' => '120px',
'height' => '167px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -195,38 +195,38 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '30px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'October 2018 ',
@@ -235,45 +235,45 @@ class ClearNews {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => '2_1',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'Good Morning!
@@ -281,38 +281,38 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '24px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -321,9 +321,9 @@ class ClearNews {
'fullWidth' => false,
'width' => '360px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -333,50 +333,50 @@ class ClearNews {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -390,57 +390,57 @@ class ClearNews {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Today\'s Top Stories ',
@@ -449,13 +449,13 @@ class ClearNews {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'automatedLatestContentLayout',
'withLayout' => true,
'amount' => '3',
'contentType' => 'post',
- 'terms' =>
+ 'terms' =>
array (
),
'inclusionType' => 'include',
@@ -471,14 +471,14 @@ class ClearNews {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'type' => 'button',
'text' => 'Read more',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e2973f',
'borderColor' => '#e2973f',
@@ -498,12 +498,12 @@ class ClearNews {
),
'sortBy' => 'newest',
'showDivider' => false,
- 'divider' =>
+ 'divider' =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -517,50 +517,50 @@ class ClearNews {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -574,57 +574,57 @@ class ClearNews {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'We cover all types of news ',
@@ -633,52 +633,52 @@ class ClearNews {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'World',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e23f3f',
'borderColor' => '#e2973f',
@@ -697,33 +697,33 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Business',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#50b6ce',
'borderColor' => '#e2973f',
@@ -742,33 +742,33 @@ class ClearNews {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Politics',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#506dce',
'borderColor' => '#e2973f',
@@ -789,52 +789,52 @@ class ClearNews {
),
),
),
- 9 =>
+ 9 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Sports',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e1bc2d',
'borderColor' => '#e2973f',
@@ -853,33 +853,33 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Science',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#a650ce',
'borderColor' => '#e2973f',
@@ -898,33 +898,33 @@ class ClearNews {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Health',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#64b03c',
'borderColor' => '#e2973f',
@@ -945,52 +945,52 @@ class ClearNews {
),
),
),
- 10 =>
+ 10 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Family',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#278f6e',
'borderColor' => '#e2973f',
@@ -1009,33 +1009,33 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Arts',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#7c5e5e',
'borderColor' => '#e2973f',
@@ -1054,33 +1054,33 @@ class ClearNews {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'button',
'text' => 'Local',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#4d4d4d',
'borderColor' => '#e2973f',
@@ -1101,50 +1101,50 @@ class ClearNews {
),
),
),
- 11 =>
+ 11 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '20px',
@@ -1155,50 +1155,50 @@ class ClearNews {
),
),
),
- 12 =>
+ 12 =>
array (
'type' => 'container',
'columnLayout' => '1_2',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/News-Crossword.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -1207,51 +1207,51 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'The Friday Crossword
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum vitae ornare elit. Duis laoreet justo sed fringilla maximus. Aenean pharetra nec risus a vestibulum.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Get started',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e2973f',
'borderColor' => '#e2973f',
@@ -1268,12 +1268,12 @@ class ClearNews {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '22px',
@@ -1284,50 +1284,50 @@ class ClearNews {
),
),
),
- 13 =>
+ 13 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '34.5px',
@@ -1341,45 +1341,45 @@ class ClearNews {
),
),
),
- 14 =>
+ 14 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -1388,9 +1388,9 @@ class ClearNews {
'fullWidth' => false,
'width' => '120px',
'height' => '167px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -1398,64 +1398,64 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'Unsubscribe
Manage your subscription
',
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Add your postal address!
',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'social',
'iconSet' => 'circles',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1465,7 +1465,7 @@ class ClearNews {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1475,7 +1475,7 @@ class ClearNews {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'youtube',
@@ -1487,11 +1487,11 @@ class ClearNews {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'default',
- 'icons' =>
+ 'icons' =>
array (
),
),
@@ -1501,49 +1501,49 @@ class ClearNews {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Source Sans Pro',
'fontSize' => '15px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '40px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '24px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '16px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#e2973f',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -1561,14 +1561,14 @@ class ClearNews {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1587,12 +1587,12 @@ class ClearNews {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1605,7 +1605,7 @@ class ClearNews {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '3',
'withLayout' => true,
@@ -1623,14 +1623,14 @@ class ClearNews {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e2973f',
'borderColor' => '#e2973f',
@@ -1650,12 +1650,12 @@ class ClearNews {
),
'sortBy' => 'newest',
'showDivider' => false,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1669,17 +1669,17 @@ class ClearNews {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
'type' => 'automatedLatestContentLayout',
- 'terms' =>
+ 'terms' =>
array (
),
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#4d4d4d',
'borderColor' => '#e2973f',
@@ -1697,11 +1697,11 @@ class ClearNews {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '34.5px',
@@ -1712,23 +1712,23 @@ class ClearNews {
),
'type' => 'divider',
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '13px',
'textAlign' => 'right',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#e2973f',
'textDecoration' => 'underline',
@@ -1736,7 +1736,7 @@ class ClearNews {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1755,14 +1755,14 @@ class ClearNews {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => 'http://mailpoet.info/ladybirds-transparent-shell-reveals-how-it-folds-its-wings/',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e2973f',
'borderColor' => '#e2973f',
@@ -1782,12 +1782,12 @@ class ClearNews {
),
'sortBy' => 'newest',
'showDivider' => false,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1802,17 +1802,17 @@ class ClearNews {
'backgroundColorAlternate' => '#eeeeee',
'type' => 'posts',
'offset' => 0,
- 'terms' =>
+ 'terms' =>
array (
),
'search' => '',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'circles',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1822,7 +1822,7 @@ class ClearNews {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1832,7 +1832,7 @@ class ClearNews {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'youtube',
@@ -1845,11 +1845,11 @@ class ClearNews {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '20px',
@@ -1857,23 +1857,23 @@ class ClearNews {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '11px',
'textAlign' => 'left',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#e2973f',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/Coffee.php b/lib/Config/PopulatorData/Templates/Coffee.php
index 5b1681b7aa..52baafb3b8 100644
--- a/lib/Config/PopulatorData/Templates/Coffee.php
+++ b/lib/Config/PopulatorData/Templates/Coffee.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f5f5f5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
@@ -102,71 +102,71 @@ class FashionBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f5f5f5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'October 2018 Edition
',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'View Online
',
@@ -175,45 +175,45 @@ class FashionBlogA {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f5f5f5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -222,20 +222,20 @@ class FashionBlogA {
'fullWidth' => false,
'width' => '157px',
'height' => '48px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -246,68 +246,68 @@ class FashionBlogA {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Fashion-Header.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '90px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'October 2018
Autumn Season ',
),
- 2 =>
+ 2 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
@@ -318,69 +318,69 @@ class FashionBlogA {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis orci justo, commodo mattis nisi ullamcorper vitae. Sed aliquam, ex ac lacinia tempus, enim urna luctus odio, at consequat leo ante non tellus.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis orci justo, commodo mattis nisi ullamcorper vitae.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -391,45 +391,45 @@ class FashionBlogA {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => '1_2',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f6e4e4',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -438,9 +438,9 @@ class FashionBlogA {
'fullWidth' => true,
'width' => '400px',
'height' => '600px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -448,52 +448,52 @@ class FashionBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => '$59
New Outfit
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis orci justo, commodo mattis nisi ullamcorper vitae. Lorem ipsum dolor sit amet.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Read more',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ae6ca1',
'borderColor' => '#0074a2',
@@ -514,71 +514,71 @@ class FashionBlogA {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => '2_1',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ebe8e8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => '$159
New Outfit
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis orci justo, commodo mattis nisi ullamcorper vitae. Lorem ipsum dolor sit amet.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Read more',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ae6ca1',
'borderColor' => '#0074a2',
@@ -597,26 +597,26 @@ class FashionBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -625,9 +625,9 @@ class FashionBlogA {
'fullWidth' => true,
'width' => '400px',
'height' => '600px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -637,45 +637,45 @@ class FashionBlogA {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => '1_2',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f6e4e4',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -684,9 +684,9 @@ class FashionBlogA {
'fullWidth' => true,
'width' => '400px',
'height' => '600px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -694,52 +694,52 @@ class FashionBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => '$25
New Outfit
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis orci justo, commodo mattis nisi ullamcorper vitae. Lorem ipsum dolor sit amet.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Read more',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ae6ca1',
'borderColor' => '#0074a2',
@@ -760,57 +760,57 @@ class FashionBlogA {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => '2_1',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Fashion-Instagram.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '50px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -819,15 +819,15 @@ class FashionBlogA {
'fullWidth' => false,
'width' => '52px',
'height' => '504px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'text',
'text' => 'Our new Instagram Page
@@ -835,14 +835,14 @@ class FashionBlogA {
We\'ll be keeping everyone up to date with the latest
fashion and style advice every day.
',
),
- 3 =>
+ 3 =>
array (
'type' => 'button',
'text' => 'Check it out',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#151515',
'borderColor' => '#0074a2',
@@ -859,12 +859,12 @@ class FashionBlogA {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '35px',
@@ -873,31 +873,31 @@ class FashionBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -908,63 +908,63 @@ class FashionBlogA {
),
),
),
- 9 =>
+ 9 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f5f5f5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -974,7 +974,7 @@ class FashionBlogA {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -984,7 +984,7 @@ class FashionBlogA {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1000,62 +1000,62 @@ class FashionBlogA {
),
),
),
- 10 =>
+ 10 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f5f5f5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage your subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#ae70ad',
'textDecoration' => 'none',
@@ -1068,49 +1068,49 @@ class FashionBlogA {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#626262',
'fontFamily' => 'Noticia Text',
'fontSize' => '14px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '30px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '22px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#505050',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '20px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759b',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#f5f5f5',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -1128,14 +1128,14 @@ class FashionBlogA {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1154,12 +1154,12 @@ class FashionBlogA {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1172,7 +1172,7 @@ class FashionBlogA {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '5',
'withLayout' => true,
@@ -1190,14 +1190,14 @@ class FashionBlogA {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1216,12 +1216,12 @@ class FashionBlogA {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1234,13 +1234,13 @@ class FashionBlogA {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ae6ca1',
'borderColor' => '#0074a2',
@@ -1258,11 +1258,11 @@ class FashionBlogA {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1272,23 +1272,23 @@ class FashionBlogA {
),
),
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#ae70ad',
'textDecoration' => 'none',
@@ -1296,7 +1296,7 @@ class FashionBlogA {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1315,14 +1315,14 @@ class FashionBlogA {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1342,12 +1342,12 @@ class FashionBlogA {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1362,17 +1362,17 @@ class FashionBlogA {
'backgroundColorAlternate' => '#eeeeee',
'type' => 'posts',
'offset' => 0,
- 'terms' =>
+ 'terms' =>
array (
),
'search' => '',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1382,7 +1382,7 @@ class FashionBlogA {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1392,7 +1392,7 @@ class FashionBlogA {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1405,11 +1405,11 @@ class FashionBlogA {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
@@ -1417,23 +1417,23 @@ class FashionBlogA {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/FashionShop.php b/lib/Config/PopulatorData/Templates/FashionShop.php
index eed3d9aa9c..340a13142f 100644
--- a/lib/Config/PopulatorData/Templates/FashionShop.php
+++ b/lib/Config/PopulatorData/Templates/FashionShop.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'header',
'text' => 'Open this email in your web browser.
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -138,62 +138,62 @@ class FashionShop {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/FashionKids-Header.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '60px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'AUTUMN RANGE 2018
',
),
- 2 =>
+ 2 =>
array (
'type' => 'image',
'link' => '',
@@ -202,25 +202,25 @@ class FashionShop {
'fullWidth' => false,
'width' => '200px',
'height' => '64px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'text',
'text' => 'IT\'S TIME TO EXPLORE ',
),
- 4 =>
+ 4 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '403px',
@@ -231,45 +231,45 @@ class FashionShop {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6d4dd',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -278,53 +278,53 @@ class FashionShop {
'fullWidth' => true,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '100px',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'text',
'text' => 'Keep them warm this autumn with our whole new range just for your little ones ',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -333,9 +333,9 @@ class FashionShop {
'fullWidth' => true,
'width' => '400px',
'height' => '800px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -345,45 +345,45 @@ class FashionShop {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6d4dd',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -392,9 +392,9 @@ class FashionShop {
'fullWidth' => true,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -402,38 +402,38 @@ class FashionShop {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '113px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'All of our clothes are easy to wash and are ready for your little explorers ',
@@ -442,57 +442,57 @@ class FashionShop {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -501,9 +501,9 @@ class FashionShop {
'fullWidth' => false,
'width' => '187px',
'height' => '30px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -511,44 +511,44 @@ class FashionShop {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '35px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-color',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -558,7 +558,7 @@ class FashionShop {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -568,7 +568,7 @@ class FashionShop {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -578,7 +578,7 @@ class FashionShop {
'width' => '32px',
'text' => 'Instagram',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'youtube',
@@ -594,62 +594,62 @@ class FashionShop {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage your subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759b',
'textDecoration' => 'none',
@@ -662,49 +662,49 @@ class FashionShop {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '15px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Georgia',
'fontSize' => '30px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Georgia',
'fontSize' => '26px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Georgia',
'fontSize' => '24px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759B',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -722,14 +722,14 @@ class FashionShop {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -748,12 +748,12 @@ class FashionShop {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -766,7 +766,7 @@ class FashionShop {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '5',
'withLayout' => true,
@@ -784,14 +784,14 @@ class FashionShop {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -810,12 +810,12 @@ class FashionShop {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -828,13 +828,13 @@ class FashionShop {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Button',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -851,11 +851,11 @@ class FashionShop {
),
),
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -865,23 +865,23 @@ class FashionShop {
),
),
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759b',
'textDecoration' => 'none',
@@ -889,7 +889,7 @@ class FashionShop {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -908,14 +908,14 @@ class FashionShop {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -934,12 +934,12 @@ class FashionShop {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -952,12 +952,12 @@ class FashionShop {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'full-symbol-color',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -967,7 +967,7 @@ class FashionShop {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -977,7 +977,7 @@ class FashionShop {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -987,7 +987,7 @@ class FashionShop {
'width' => '32px',
'text' => 'Instagram',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'youtube',
@@ -1000,11 +1000,11 @@ class FashionShop {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '35px',
@@ -1012,23 +1012,23 @@ class FashionShop {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/FashionStore.php b/lib/Config/PopulatorData/Templates/FashionStore.php
index 1509d97989..4115e31d9f 100644
--- a/lib/Config/PopulatorData/Templates/FashionStore.php
+++ b/lib/Config/PopulatorData/Templates/FashionStore.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#eae5e5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'header',
'text' => 'View this email in your browser.
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
@@ -114,57 +114,57 @@ class FlowersWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -173,9 +173,9 @@ class FlowersWithCoupon {
'fullWidth' => false,
'width' => '110px',
'height' => '180px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -183,44 +183,44 @@ class FlowersWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '44px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -230,7 +230,7 @@ class FlowersWithCoupon {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -240,7 +240,7 @@ class FlowersWithCoupon {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -256,45 +256,45 @@ class FlowersWithCoupon {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -303,15 +303,15 @@ class FlowersWithCoupon {
'fullWidth' => true,
'width' => '1280px',
'height' => '850px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Just for you. ',
@@ -320,58 +320,58 @@ class FlowersWithCoupon {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'Welcome to our flower store - as a token of our appreciation for you signing up,
here\'s a little gift from us for your next order.
',
),
- 1 =>
+ 1 =>
array (
'type' => 'button',
'text' => 'CoUpOn_Code',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#292929',
'borderColor' => '#0074a2',
@@ -388,17 +388,17 @@ class FlowersWithCoupon {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'text',
'text' => '10% off your next order with us. Terms and Conditions apply.
',
),
- 3 =>
+ 3 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -409,50 +409,50 @@ class FlowersWithCoupon {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '45px',
@@ -463,55 +463,55 @@ class FlowersWithCoupon {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'A little inspiration to get you started... ',
),
- 1 =>
+ 1 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -522,62 +522,62 @@ class FlowersWithCoupon {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'New flowers delivered ',
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut rutrum et lacus a dignissim. Curabitur id nisi malesuada, pharetra massa ut, bibendum lacus.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Buy Now',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
'borderColor' => '#0074a2',
@@ -596,26 +596,26 @@ class FlowersWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -624,9 +624,9 @@ class FlowersWithCoupon {
'fullWidth' => false,
'width' => '730px',
'height' => '604px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -636,50 +636,50 @@ class FlowersWithCoupon {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -690,45 +690,45 @@ class FlowersWithCoupon {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -737,9 +737,9 @@ class FlowersWithCoupon {
'fullWidth' => false,
'width' => '730px',
'height' => '604px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -747,43 +747,43 @@ class FlowersWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'Save with a subscription ',
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut rutrum et lacus a dignissim. Curabitur id nisi malesuada, pharetra massa ut, bibendum lacus.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Buy Now',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
'borderColor' => '#0074a2',
@@ -804,50 +804,50 @@ class FlowersWithCoupon {
),
),
),
- 9 =>
+ 9 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -858,62 +858,62 @@ class FlowersWithCoupon {
),
),
),
- 10 =>
+ 10 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'Collect from our store ',
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut rutrum et lacus a dignissim. Curabitur id nisi malesuada, pharetra massa ut, bibendum lacus.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Buy Now',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
'borderColor' => '#0074a2',
@@ -932,26 +932,26 @@ class FlowersWithCoupon {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -960,9 +960,9 @@ class FlowersWithCoupon {
'fullWidth' => false,
'width' => '730px',
'height' => '604px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -972,50 +972,50 @@ class FlowersWithCoupon {
),
),
),
- 11 =>
+ 11 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
@@ -1026,63 +1026,63 @@ class FlowersWithCoupon {
),
),
),
- 12 =>
+ 12 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#eae5e5',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'grey',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1092,7 +1092,7 @@ class FlowersWithCoupon {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1102,7 +1102,7 @@ class FlowersWithCoupon {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1114,24 +1114,24 @@ class FlowersWithCoupon {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1144,49 +1144,49 @@ class FlowersWithCoupon {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '14px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Arial',
'fontSize' => '30px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '24px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Arial',
'fontSize' => '22px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#e0a9bc',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#eae5e5',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -1204,14 +1204,14 @@ class FlowersWithCoupon {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1230,12 +1230,12 @@ class FlowersWithCoupon {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1248,7 +1248,7 @@ class FlowersWithCoupon {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '5',
'withLayout' => true,
@@ -1266,14 +1266,14 @@ class FlowersWithCoupon {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1292,12 +1292,12 @@ class FlowersWithCoupon {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1310,13 +1310,13 @@ class FlowersWithCoupon {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Buy Now',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#e0a9bc',
'borderColor' => '#0074a2',
@@ -1334,11 +1334,11 @@ class FlowersWithCoupon {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1348,23 +1348,23 @@ class FlowersWithCoupon {
),
),
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1372,7 +1372,7 @@ class FlowersWithCoupon {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1391,14 +1391,14 @@ class FlowersWithCoupon {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1417,12 +1417,12 @@ class FlowersWithCoupon {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1435,12 +1435,12 @@ class FlowersWithCoupon {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'grey',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1450,7 +1450,7 @@ class FlowersWithCoupon {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1460,7 +1460,7 @@ class FlowersWithCoupon {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1473,11 +1473,11 @@ class FlowersWithCoupon {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '392px',
@@ -1485,23 +1485,23 @@ class FlowersWithCoupon {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/FoodBox.php b/lib/Config/PopulatorData/Templates/FoodBox.php
index 6efa2619e3..914eeda2b6 100644
--- a/lib/Config/PopulatorData/Templates/FoodBox.php
+++ b/lib/Config/PopulatorData/Templates/FoodBox.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '50px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -107,9 +107,9 @@ class IndustryConference {
'fullWidth' => false,
'width' => '150px',
'height' => '150px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -119,45 +119,45 @@ class IndustryConference {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'Get ready for the biggest email conference of the year
',
@@ -166,57 +166,57 @@ class IndustryConference {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => '2_1',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Conf-Header-2.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '56px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -225,25 +225,25 @@ class IndustryConference {
'fullWidth' => false,
'width' => '339px',
'height' => '177px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'text',
'text' => 'Email Boston 2018 ',
),
- 3 =>
+ 3 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -252,31 +252,31 @@ class IndustryConference {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '133px',
@@ -287,13 +287,13 @@ class IndustryConference {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'automatedLatestContentLayout',
'withLayout' => true,
'amount' => '3',
'contentType' => 'post',
- 'terms' =>
+ 'terms' =>
array (
),
'inclusionType' => 'include',
@@ -309,14 +309,14 @@ class IndustryConference {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'type' => 'button',
'text' => 'Read the post',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b8291e',
'borderColor' => '#0074a2',
@@ -336,12 +336,12 @@ class IndustryConference {
),
'sortBy' => 'oldest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -355,45 +355,45 @@ class IndustryConference {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -402,9 +402,9 @@ class IndustryConference {
'fullWidth' => true,
'width' => '1280px',
'height' => '50px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -414,50 +414,50 @@ class IndustryConference {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
'height' => '34px',
@@ -468,71 +468,71 @@ class IndustryConference {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/Industry-Coupon.png',
'display' => 'fit',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '75px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => '---
Grab 20% off your tickets right now
We\'re offering an exclusive 20% off tickets with this coupon code!
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'CouPon_Code',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b8291e',
'borderColor' => '#ffffff',
@@ -549,24 +549,24 @@ class IndustryConference {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '33px',
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '45px',
@@ -577,50 +577,50 @@ class IndustryConference {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
'height' => '20px',
@@ -631,45 +631,45 @@ class IndustryConference {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -678,20 +678,20 @@ class IndustryConference {
'fullWidth' => true,
'width' => '1280px',
'height' => '12px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'padding' => '14px',
@@ -705,57 +705,57 @@ class IndustryConference {
),
),
),
- 9 =>
+ 9 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '30px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -764,9 +764,9 @@ class IndustryConference {
'fullWidth' => false,
'width' => '1000px',
'height' => '667px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -774,51 +774,51 @@ class IndustryConference {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '46px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Check out this year\'s event
We\'ve ramped up everything this year for our conference, including amazing new speakers and guests, and a few surprises for everyone.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'button',
'text' => 'Buy a ticket here',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b8291e',
'borderColor' => '#0074a2',
@@ -839,62 +839,62 @@ class IndustryConference {
),
),
),
- 10 =>
+ 10 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
'padding' => '1.5px',
@@ -904,7 +904,7 @@ class IndustryConference {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'image',
'link' => '',
@@ -913,9 +913,9 @@ class IndustryConference {
'fullWidth' => true,
'width' => '1280px',
'height' => '50px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -925,75 +925,75 @@ class IndustryConference {
),
),
),
- 11 =>
+ 11 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
'height' => '30px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
'height' => '20px',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-grey',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1003,7 +1003,7 @@ class IndustryConference {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1013,7 +1013,7 @@ class IndustryConference {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'email',
@@ -1023,7 +1023,7 @@ class IndustryConference {
'width' => '32px',
'text' => 'Email',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1035,48 +1035,48 @@ class IndustryConference {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'header',
'text' => ' Open this email in your web browser.
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#8d8d8d',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#ffffff',
'textDecoration' => 'underline',
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1089,49 +1089,49 @@ class IndustryConference {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Merriweather Sans',
'fontSize' => '14px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Arvo',
'fontSize' => '40px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arvo',
'fontSize' => '26px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Arvo',
'fontSize' => '18px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#b8291e',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#222222',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -1149,14 +1149,14 @@ class IndustryConference {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1175,12 +1175,12 @@ class IndustryConference {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1193,7 +1193,7 @@ class IndustryConference {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '3',
'withLayout' => true,
@@ -1211,14 +1211,14 @@ class IndustryConference {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read the post',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b8291e',
'borderColor' => '#0074a2',
@@ -1238,12 +1238,12 @@ class IndustryConference {
),
'sortBy' => 'oldest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1257,17 +1257,17 @@ class IndustryConference {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
'type' => 'automatedLatestContentLayout',
- 'terms' =>
+ 'terms' =>
array (
),
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Read the post',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b8291e',
'borderColor' => '#ffffff',
@@ -1285,11 +1285,11 @@ class IndustryConference {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#222222',
'padding' => '1.5px',
@@ -1300,23 +1300,23 @@ class IndustryConference {
),
'type' => 'divider',
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1324,7 +1324,7 @@ class IndustryConference {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1343,14 +1343,14 @@ class IndustryConference {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1369,12 +1369,12 @@ class IndustryConference {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1387,12 +1387,12 @@ class IndustryConference {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'full-symbol-grey',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1402,7 +1402,7 @@ class IndustryConference {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1412,7 +1412,7 @@ class IndustryConference {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'email',
@@ -1422,7 +1422,7 @@ class IndustryConference {
'width' => '32px',
'text' => 'Email',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1435,11 +1435,11 @@ class IndustryConference {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '75px',
@@ -1447,23 +1447,23 @@ class IndustryConference {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#8d8d8d',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#ffffff',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/KidsClothing.php b/lib/Config/PopulatorData/Templates/KidsClothing.php
index b5cab64db0..8bc7568d62 100644
--- a/lib/Config/PopulatorData/Templates/KidsClothing.php
+++ b/lib/Config/PopulatorData/Templates/KidsClothing.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'header',
'text' => 'View online
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#adadad',
'textDecoration' => 'underline',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'image',
'link' => '',
@@ -131,44 +131,44 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '130px',
'height' => '94px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'text',
'text' => 'Fashion Week Special ',
),
- 5 =>
+ 5 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'image',
'link' => '',
@@ -177,32 +177,32 @@ class LifestyleBlogA {
'fullWidth' => true,
'width' => '900px',
'height' => '426px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet scelerisque odio. Pellentesque nisl massa, ullamcorper eu gravida varius, mollis eu orci.
',
),
- 8 =>
+ 8 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 9 =>
+ 9 =>
array (
'type' => 'image',
'link' => '',
@@ -211,9 +211,9 @@ class LifestyleBlogA {
'fullWidth' => true,
'width' => '900px',
'height' => '65px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -223,45 +223,45 @@ class LifestyleBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c83142',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -270,21 +270,21 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Big announcement from top artists
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet scelerisque odio. Pellentesque nisl massa, ullamcorper eu gravida varius, mollis eu orci.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'image',
'link' => '',
@@ -293,9 +293,9 @@ class LifestyleBlogA {
'fullWidth' => true,
'width' => '900px',
'height' => '65px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -305,50 +305,50 @@ class LifestyleBlogA {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#6d3aa7',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -359,45 +359,45 @@ class LifestyleBlogA {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => '1_2',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#6d3aa7',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -406,9 +406,9 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -416,38 +416,38 @@ class LifestyleBlogA {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '34px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'New Workshops to begin
@@ -457,45 +457,45 @@ class LifestyleBlogA {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -504,9 +504,9 @@ class LifestyleBlogA {
'fullWidth' => true,
'width' => '900px',
'height' => '65px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -516,50 +516,50 @@ class LifestyleBlogA {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#0f2f41',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
@@ -570,45 +570,45 @@ class LifestyleBlogA {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#0f2f41',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -617,41 +617,41 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet scelerisque.
',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -660,41 +660,41 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet scelerisque.
',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -703,15 +703,15 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet scelerisque.
',
@@ -720,45 +720,45 @@ class LifestyleBlogA {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#0f2f41',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -767,9 +767,9 @@ class LifestyleBlogA {
'fullWidth' => true,
'width' => '900px',
'height' => '65px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -779,57 +779,57 @@ class LifestyleBlogA {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -838,21 +838,21 @@ class LifestyleBlogA {
'fullWidth' => false,
'width' => '170px',
'height' => '40px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -862,7 +862,7 @@ class LifestyleBlogA {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -872,7 +872,7 @@ class LifestyleBlogA {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -884,24 +884,24 @@ class LifestyleBlogA {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -914,49 +914,49 @@ class LifestyleBlogA {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Trebuchet MS',
'fontSize' => '14px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Courier New',
'fontSize' => '30px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Courier New',
'fontSize' => '24px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Courier New',
'fontSize' => '20px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759B',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -974,14 +974,14 @@ class LifestyleBlogA {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1000,12 +1000,12 @@ class LifestyleBlogA {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1018,7 +1018,7 @@ class LifestyleBlogA {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '5',
'withLayout' => true,
@@ -1036,14 +1036,14 @@ class LifestyleBlogA {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1062,12 +1062,12 @@ class LifestyleBlogA {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1080,13 +1080,13 @@ class LifestyleBlogA {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Button',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1103,11 +1103,11 @@ class LifestyleBlogA {
),
),
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1117,23 +1117,23 @@ class LifestyleBlogA {
),
),
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1141,7 +1141,7 @@ class LifestyleBlogA {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1160,14 +1160,14 @@ class LifestyleBlogA {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1186,12 +1186,12 @@ class LifestyleBlogA {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1204,12 +1204,12 @@ class LifestyleBlogA {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1219,7 +1219,7 @@ class LifestyleBlogA {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1229,7 +1229,7 @@ class LifestyleBlogA {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1242,11 +1242,11 @@ class LifestyleBlogA {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '40px',
@@ -1254,23 +1254,23 @@ class LifestyleBlogA {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#adadad',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/LifestyleBlogB.php b/lib/Config/PopulatorData/Templates/LifestyleBlogB.php
index 6453384202..d85e164306 100644
--- a/lib/Config/PopulatorData/Templates/LifestyleBlogB.php
+++ b/lib/Config/PopulatorData/Templates/LifestyleBlogB.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -107,9 +107,9 @@ class LifestyleBlogB {
'fullWidth' => true,
'width' => '160px',
'height' => '57px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -117,55 +117,55 @@ class LifestyleBlogB {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'header',
'text' => 'View online >
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'right',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
@@ -176,50 +176,50 @@ class LifestyleBlogB {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
@@ -230,57 +230,57 @@ class LifestyleBlogB {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => $this->template_image_url . '/WomensLifestyle-Header.jpg',
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b25187',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '440px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -289,9 +289,9 @@ class LifestyleBlogB {
'fullWidth' => true,
'width' => '900px',
'height' => '61px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -301,45 +301,45 @@ class LifestyleBlogB {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => 'FEATURED ARTICLE THIS MONTH
@@ -349,45 +349,45 @@ class LifestyleBlogB {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => '1
@@ -395,26 +395,26 @@ class LifestyleBlogB {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => '2
@@ -422,26 +422,26 @@ class LifestyleBlogB {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'text',
'text' => '3
@@ -451,64 +451,64 @@ class LifestyleBlogB {
),
),
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '23px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'button',
'text' => 'Read the article',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b25088',
'borderColor' => '#0074a2',
@@ -525,12 +525,12 @@ class LifestyleBlogB {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '21px',
@@ -541,45 +541,45 @@ class LifestyleBlogB {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -588,9 +588,9 @@ class LifestyleBlogB {
'fullWidth' => true,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -598,38 +598,38 @@ class LifestyleBlogB {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '71px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'PODCASTS
@@ -640,50 +640,50 @@ class LifestyleBlogB {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
@@ -694,57 +694,57 @@ class LifestyleBlogB {
),
),
),
- 8 =>
+ 8 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '71px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'PSYCHOLOGY
@@ -753,26 +753,26 @@ class LifestyleBlogB {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -781,9 +781,9 @@ class LifestyleBlogB {
'fullWidth' => true,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -793,50 +793,50 @@ class LifestyleBlogB {
),
),
),
- 9 =>
+ 9 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
@@ -847,45 +847,45 @@ class LifestyleBlogB {
),
),
),
- 10 =>
+ 10 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -894,9 +894,9 @@ class LifestyleBlogB {
'fullWidth' => true,
'width' => '400px',
'height' => '400px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -904,38 +904,38 @@ class LifestyleBlogB {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '71px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'TECHNOLOGY
@@ -946,50 +946,50 @@ class LifestyleBlogB {
),
),
),
- 11 =>
+ 11 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '50px',
@@ -1000,45 +1000,45 @@ class LifestyleBlogB {
),
),
),
- 12 =>
+ 12 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -1047,21 +1047,21 @@ class LifestyleBlogB {
'fullWidth' => false,
'width' => '112px',
'height' => '57px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'circles',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1071,7 +1071,7 @@ class LifestyleBlogB {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1081,7 +1081,7 @@ class LifestyleBlogB {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'website',
@@ -1091,7 +1091,7 @@ class LifestyleBlogB {
'width' => '32px',
'text' => 'Website',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'pinterest',
@@ -1103,24 +1103,24 @@ class LifestyleBlogB {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1133,49 +1133,49 @@ class LifestyleBlogB {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '15px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Arial',
'fontSize' => '30px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '24px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Arial',
'fontSize' => '22px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#21759B',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -1193,14 +1193,14 @@ class LifestyleBlogB {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1219,12 +1219,12 @@ class LifestyleBlogB {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1237,7 +1237,7 @@ class LifestyleBlogB {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '5',
'withLayout' => true,
@@ -1255,14 +1255,14 @@ class LifestyleBlogB {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1281,12 +1281,12 @@ class LifestyleBlogB {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1299,13 +1299,13 @@ class LifestyleBlogB {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Read the article',
'url' => '',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#b25088',
'borderColor' => '#0074a2',
@@ -1323,11 +1323,11 @@ class LifestyleBlogB {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1337,23 +1337,23 @@ class LifestyleBlogB {
),
),
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1361,7 +1361,7 @@ class LifestyleBlogB {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1380,14 +1380,14 @@ class LifestyleBlogB {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1406,12 +1406,12 @@ class LifestyleBlogB {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1424,12 +1424,12 @@ class LifestyleBlogB {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'circles',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1439,7 +1439,7 @@ class LifestyleBlogB {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1449,7 +1449,7 @@ class LifestyleBlogB {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'website',
@@ -1459,7 +1459,7 @@ class LifestyleBlogB {
'width' => '32px',
'text' => 'Website',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'pinterest',
@@ -1472,11 +1472,11 @@ class LifestyleBlogB {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
@@ -1484,23 +1484,23 @@ class LifestyleBlogB {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'right',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/Minimal.php b/lib/Config/PopulatorData/Templates/Minimal.php
index 5a9ea3987e..5f37ca1632 100644
--- a/lib/Config/PopulatorData/Templates/Minimal.php
+++ b/lib/Config/PopulatorData/Templates/Minimal.php
@@ -1,7 +1,7 @@
+ 'content' =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f2f9f8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '28px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => '[date:mtext][date:dordinal],[date:y] ',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'header',
'text' => 'Open this email in your web browser.
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'right',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
@@ -164,45 +164,45 @@ class NewspaperTraditional {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => '2_1',
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#f2f9f8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'image',
'link' => '',
@@ -211,9 +211,9 @@ class NewspaperTraditional {
'fullWidth' => false,
'width' => '200px',
'height' => '100px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'left',
),
@@ -221,32 +221,32 @@ class NewspaperTraditional {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -256,7 +256,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -266,7 +266,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'website',
@@ -276,7 +276,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Website',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -292,133 +292,133 @@ class NewspaperTraditional {
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Local News
',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Sports Updates & Scores
',
),
),
),
- 2 =>
+ 2 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Business News
',
@@ -427,57 +427,57 @@ class NewspaperTraditional {
),
),
),
- 3 =>
+ 3 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'text',
'text' => 'Check Out Our New Blog Posts!
@@ -488,12 +488,12 @@ class NewspaperTraditional {
To edit the settings and styles of your post, simply click on a post below.
',
),
- 2 =>
+ 2 =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -507,13 +507,13 @@ class NewspaperTraditional {
),
),
),
- 4 =>
+ 4 =>
array (
'type' => 'automatedLatestContentLayout',
'withLayout' => true,
'amount' => '3',
'contentType' => 'post',
- 'terms' =>
+ 'terms' =>
array (
),
'inclusionType' => 'include',
@@ -529,14 +529,14 @@ class NewspaperTraditional {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'type' => 'button',
'text' => 'Read the post',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -555,12 +555,12 @@ class NewspaperTraditional {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'type' => 'divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -573,50 +573,50 @@ class NewspaperTraditional {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 5 =>
+ 5 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
'height' => '30px',
@@ -627,57 +627,57 @@ class NewspaperTraditional {
),
),
),
- 6 =>
+ 6 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
'height' => '28px',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'image',
'link' => '',
@@ -686,9 +686,9 @@ class NewspaperTraditional {
'fullWidth' => false,
'width' => '200px',
'height' => '100px',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'textAlign' => 'center',
),
@@ -696,56 +696,56 @@ class NewspaperTraditional {
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'footer',
'text' => 'Unsubscribe | Manage your subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
),
),
),
- 1 =>
+ 1 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -755,7 +755,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -765,7 +765,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -775,7 +775,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Instagram',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'email',
@@ -791,50 +791,50 @@ class NewspaperTraditional {
),
),
),
- 7 =>
+ 7 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
- 'image' =>
+ 'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
),
- 'blocks' =>
+ 'blocks' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'spacer',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#c6dbd8',
'height' => '21px',
@@ -847,49 +847,49 @@ class NewspaperTraditional {
),
),
),
- 'globalStyles' =>
+ 'globalStyles' =>
array (
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Playfair Display',
'fontSize' => '14px',
),
- 'h1' =>
+ 'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Merriweather',
'fontSize' => '26px',
),
- 'h2' =>
+ 'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Merriweather',
'fontSize' => '22px',
),
- 'h3' =>
+ 'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Merriweather',
'fontSize' => '18px',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#3d8076',
'textDecoration' => 'underline',
),
- 'wrapper' =>
+ 'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
- 'body' =>
+ 'body' =>
array (
'backgroundColor' => '#f2f9f8',
),
),
- 'blockDefaults' =>
+ 'blockDefaults' =>
array (
- 'automatedLatestContent' =>
+ 'automatedLatestContent' =>
array (
'amount' => '5',
'withLayout' => false,
@@ -907,14 +907,14 @@ class NewspaperTraditional {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -933,12 +933,12 @@ class NewspaperTraditional {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContent.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -951,7 +951,7 @@ class NewspaperTraditional {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'automatedLatestContentLayout' =>
+ 'automatedLatestContentLayout' =>
array (
'amount' => '3',
'withLayout' => true,
@@ -969,14 +969,14 @@ class NewspaperTraditional {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read the post',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -996,12 +996,12 @@ class NewspaperTraditional {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'automatedLatestContentLayout.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1015,17 +1015,17 @@ class NewspaperTraditional {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
'type' => 'automatedLatestContentLayout',
- 'terms' =>
+ 'terms' =>
array (
),
),
- 'button' =>
+ 'button' =>
array (
'text' => 'Read the post',
'url' => '[postLink]',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1043,11 +1043,11 @@ class NewspaperTraditional {
),
'type' => 'button',
),
- 'divider' =>
+ 'divider' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1058,23 +1058,23 @@ class NewspaperTraditional {
),
'type' => 'divider',
),
- 'footer' =>
+ 'footer' =>
array (
'text' => 'Unsubscribe | Manage subscription Add your postal address here!
',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
@@ -1082,7 +1082,7 @@ class NewspaperTraditional {
),
'type' => 'footer',
),
- 'posts' =>
+ 'posts' =>
array (
'amount' => '10',
'withLayout' => true,
@@ -1101,14 +1101,14 @@ class NewspaperTraditional {
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
- 'readMoreButton' =>
+ 'readMoreButton' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
@@ -1127,12 +1127,12 @@ class NewspaperTraditional {
),
'sortBy' => 'newest',
'showDivider' => true,
- 'divider' =>
+ 'divider' =>
array (
'context' => 'posts.divider',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
@@ -1145,12 +1145,12 @@ class NewspaperTraditional {
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
- 'social' =>
+ 'social' =>
array (
'iconSet' => 'full-symbol-black',
- 'icons' =>
+ 'icons' =>
array (
- 0 =>
+ 0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
@@ -1160,7 +1160,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Facebook',
),
- 1 =>
+ 1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
@@ -1170,7 +1170,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Twitter',
),
- 2 =>
+ 2 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
@@ -1180,7 +1180,7 @@ class NewspaperTraditional {
'width' => '32px',
'text' => 'Instagram',
),
- 3 =>
+ 3 =>
array (
'type' => 'socialIcon',
'iconType' => 'email',
@@ -1193,11 +1193,11 @@ class NewspaperTraditional {
),
'type' => 'social',
),
- 'spacer' =>
+ 'spacer' =>
array (
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
@@ -1205,23 +1205,23 @@ class NewspaperTraditional {
),
'type' => 'spacer',
),
- 'header' =>
+ 'header' =>
array (
'text' => 'Display problems? Open this email in your web browser. ',
- 'styles' =>
+ 'styles' =>
array (
- 'block' =>
+ 'block' =>
array (
'backgroundColor' => 'transparent',
),
- 'text' =>
+ 'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'right',
),
- 'link' =>
+ 'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
diff --git a/lib/Config/PopulatorData/Templates/NotSoMedium.php b/lib/Config/PopulatorData/Templates/NotSoMedium.php
index b327f6b3d9..69ace49bff 100644
--- a/lib/Config/PopulatorData/Templates/NotSoMedium.php
+++ b/lib/Config/PopulatorData/Templates/NotSoMedium.php
@@ -1,7 +1,7 @@
getPrivacyPolicyContent());
}
}
@@ -38,4 +38,4 @@ class PrivacyPolicy {
'';
}
-}
\ No newline at end of file
+}
diff --git a/lib/Config/Renderer.php b/lib/Config/Renderer.php
index 355184518a..f1f03e1d67 100644
--- a/lib/Config/Renderer.php
+++ b/lib/Config/Renderer.php
@@ -7,7 +7,7 @@ use Twig_Environment as TwigEnv;
use Twig_Lexer as TwigLexer;
use Twig_Loader_Filesystem as TwigFileSystem;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Renderer {
protected $cache_path;
@@ -99,7 +99,7 @@ class Renderer {
}
function setupDebug() {
- if($this->debugging_enabled) {
+ if ($this->debugging_enabled) {
$this->renderer->addExtension(new \Twig_Extension_Debug());
}
}
diff --git a/lib/Config/RequirementsChecker.php b/lib/Config/RequirementsChecker.php
index 5ca3291efe..4bf7c7c96c 100644
--- a/lib/Config/RequirementsChecker.php
+++ b/lib/Config/RequirementsChecker.php
@@ -4,7 +4,7 @@ namespace MailPoet\Config;
use MailPoet\Util\Helpers;
use MailPoet\WP\Notice as WPNotice;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class RequirementsChecker {
const TEST_FOLDER_PERMISSIONS = 'TempAndCacheFolderCreation';
@@ -60,7 +60,7 @@ class RequirementsChecker {
'temp_path' => Env::$temp_path,
'cache_path' => Env::$cache_path
);
- if(!is_dir($paths['cache_path']) && !wp_mkdir_p($paths['cache_path'])) {
+ if (!is_dir($paths['cache_path']) && !wp_mkdir_p($paths['cache_path'])) {
$error = Helpers::replaceLinkTags(
__('MailPoet requires write permissions inside the /wp-content/uploads folder. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
'//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#folder_permissions',
@@ -70,7 +70,7 @@ class RequirementsChecker {
}
foreach ($paths as $path) {
$index_file = $path . '/index.php';
- if(!file_exists($index_file)) {
+ if (!file_exists($index_file)) {
file_put_contents(
$path . '/index.php',
str_replace('\n', PHP_EOL, 'vendor_classes as $dependency) {
$dependency_path = $this->getDependencyPath($dependency);
- if(!$dependency_path) {
+ if (!$dependency_path) {
$error = sprintf(
__('A MailPoet dependency (%s) does not appear to be loaded correctly, thus MailPoet will not work correctly. Please reinstall the plugin.', 'mailpoet'),
$dependency
@@ -121,7 +121,7 @@ class RequirementsChecker {
$pattern = '#' . preg_quote(Env::$path) . '[\\\/]#';
$is_loaded_by_plugin = preg_match($pattern, $dependency_path);
- if(!$is_loaded_by_plugin) {
+ if (!$is_loaded_by_plugin) {
$error = sprintf(
__('MailPoet has detected a dependency conflict (%s) with another plugin (%s), which may cause unexpected behavior. Please disable the offending plugin to fix this issue.', 'mailpoet'),
$dependency,
@@ -131,11 +131,11 @@ class RequirementsChecker {
$return_error = true;
// if a Twig dependency is loaded by another plugin, check for valid version
- if(strpos($dependency, '\Twig_') === 0) {
+ if (strpos($dependency, '\Twig_') === 0) {
$return_error = ($this->isValidTwigVersion()) ? false : $return_error;
}
- if($return_error) return $this->processError($error);
+ if ($return_error) return $this->processError($error);
}
}
@@ -162,7 +162,7 @@ class RequirementsChecker {
}
function processError($error) {
- if($this->display_error_notice) {
+ if ($this->display_error_notice) {
WPNotice::displayError($error);
}
return false;
diff --git a/lib/Config/ServicesChecker.php b/lib/Config/ServicesChecker.php
index de6ddc7726..2e4396528d 100644
--- a/lib/Config/ServicesChecker.php
+++ b/lib/Config/ServicesChecker.php
@@ -10,7 +10,7 @@ use MailPoet\Util\License\License;
use MailPoet\WP\DateTime;
use MailPoet\WP\Notice as WPNotice;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class ServicesChecker {
@@ -22,18 +22,18 @@ class ServicesChecker {
}
function isMailPoetAPIKeyValid($display_error_notice = true, $force_check = false) {
- if(!$force_check && !Bridge::isMPSendingServiceEnabled()) {
+ if (!$force_check && !Bridge::isMPSendingServiceEnabled()) {
return null;
}
$mss_key_specified = Bridge::isMSSKeySpecified();
$mss_key = $this->settings->get(Bridge::API_KEY_STATE_SETTING_NAME);
- if(!$mss_key_specified
+ if (!$mss_key_specified
|| empty($mss_key['state'])
|| $mss_key['state'] == Bridge::KEY_INVALID
) {
- if($display_error_notice) {
+ if ($display_error_notice) {
$error = Helpers::replaceLinkTags(
__('All sending is currently paused! Your key to send with MailPoet is invalid. [link]Visit MailPoet.com to purchase a key[/link]', 'mailpoet'),
'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers(),
@@ -45,7 +45,7 @@ class ServicesChecker {
} elseif ($mss_key['state'] == Bridge::KEY_EXPIRING
&& !empty($mss_key['data']['expire_at'])
) {
- if($display_error_notice) {
+ if ($display_error_notice) {
$date_time = new DateTime();
$date = $date_time->formatDate(strtotime($mss_key['data']['expire_at']));
$error = Helpers::replaceLinkTags(
@@ -69,16 +69,16 @@ class ServicesChecker {
$premium_plugin_active = License::getLicense();
$premium_key = $this->settings->get(Bridge::PREMIUM_KEY_STATE_SETTING_NAME);
- if(!$premium_plugin_active) {
+ if (!$premium_plugin_active) {
$display_error_notice = false;
}
- if(!$premium_key_specified
+ if (!$premium_key_specified
|| empty($premium_key['state'])
|| $premium_key['state'] === Bridge::KEY_INVALID
|| $premium_key['state'] === Bridge::KEY_ALREADY_USED
) {
- if($display_error_notice) {
+ if ($display_error_notice) {
$error_string = __('[link1]Register[/link1] your copy of the MailPoet Premium plugin to receive access to automatic upgrades and support. Need a license key? [link2]Purchase one now.[/link2]', 'mailpoet');
$error = Helpers::replaceLinkTags(
$error_string,
@@ -98,7 +98,7 @@ class ServicesChecker {
} elseif ($premium_key['state'] === Bridge::KEY_EXPIRING
&& !empty($premium_key['data']['expire_at'])
) {
- if($display_error_notice) {
+ if ($display_error_notice) {
$date_time = new DateTime();
$date = $date_time->formatDate(strtotime($premium_key['data']['expire_at']));
$error = Helpers::replaceLinkTags(
diff --git a/lib/Config/Shortcodes.php b/lib/Config/Shortcodes.php
index 89c032d6c8..cc1feea374 100644
--- a/lib/Config/Shortcodes.php
+++ b/lib/Config/Shortcodes.php
@@ -49,7 +49,7 @@ class Shortcodes {
// IMPORTANT: fixes conflict with MagicMember
remove_shortcode('user_list');
- if(isset($params['id']) && (int)$params['id'] > 0) {
+ if (isset($params['id']) && (int)$params['id'] > 0) {
$form_widget = new \MailPoet\Form\Widget();
return $form_widget->widget(array(
'form' => (int)$params['id'],
@@ -59,13 +59,13 @@ class Shortcodes {
}
function getSubscribersCount($params) {
- if(!empty($params['segments'])) {
+ if (!empty($params['segments'])) {
$segment_ids = array_map(function($segment_id) {
return (int)trim($segment_id);
}, explode(',', $params['segments']));
}
- if(empty($segment_ids)) {
+ if (empty($segment_ids)) {
return number_format_i18n(Subscriber::filter('subscribed')->count());
} else {
return number_format_i18n(
@@ -79,7 +79,7 @@ class Shortcodes {
function getArchive($params) {
$segment_ids = array();
- if(!empty($params['segments'])) {
+ if (!empty($params['segments'])) {
$segment_ids = array_map(function($segment_id) {
return (int)trim($segment_id);
}, explode(',', $params['segments']));
@@ -91,14 +91,14 @@ class Shortcodes {
$subscriber = Subscriber::getCurrentWPUser();
- if(empty($newsletters)) {
+ if (empty($newsletters)) {
return $this->wp->applyFilters(
'mailpoet_archive_no_newsletters',
__('Oops! There are no newsletters to display.', 'mailpoet')
);
} else {
$title = $this->wp->applyFilters('mailpoet_archive_title', '');
- if(!empty($title)) {
+ if (!empty($title)) {
$html .= ''.$title.' ';
}
$html .= '';
diff --git a/lib/Config/Updater.php b/lib/Config/Updater.php
index 5788de436d..5108f1afa5 100644
--- a/lib/Config/Updater.php
+++ b/lib/Config/Updater.php
@@ -6,7 +6,7 @@ use MailPoet\Services\Bridge;
use MailPoet\Services\Release\API;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Updater {
private $plugin;
@@ -28,14 +28,14 @@ class Updater {
}
function checkForUpdate($update_transient) {
- if(!is_object($update_transient)) {
+ if (!is_object($update_transient)) {
$update_transient = new \stdClass;
}
$latest_version = $this->getLatestVersion();
- if(isset($latest_version->new_version)) {
- if(version_compare($this->version, $latest_version->new_version, '<')) {
+ if (isset($latest_version->new_version)) {
+ if (version_compare($this->version, $latest_version->new_version, '<')) {
$update_transient->response[$this->plugin] = $latest_version;
}
$update_transient->last_checked = time();
diff --git a/lib/Cron/CronHelper.php b/lib/Cron/CronHelper.php
index 8a6a3ad64b..464d36e042 100644
--- a/lib/Cron/CronHelper.php
+++ b/lib/Cron/CronHelper.php
@@ -9,7 +9,7 @@ use MailPoet\Settings\SettingsController;
use MailPoet\Util\Security;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class CronHelper {
const DAEMON_EXECUTION_LIMIT = 20; // seconds
@@ -43,7 +43,7 @@ class CronHelper {
static function saveDaemonLastError($error) {
$daemon = self::getDaemon();
- if($daemon) {
+ if ($daemon) {
$daemon['last_error'] = $error;
self::saveDaemon($daemon);
}
@@ -51,7 +51,7 @@ class CronHelper {
static function saveDaemonRunCompleted($run_completed_at) {
$daemon = self::getDaemon();
- if($daemon) {
+ if ($daemon) {
$daemon['run_completed_at'] = $run_completed_at;
self::saveDaemon($daemon);
}
@@ -84,7 +84,7 @@ class CronHelper {
CronDaemonEndpoint::ACTION_PING_RESPONSE
);
$result = self::queryCronUrl($url);
- if(is_wp_error($result)) return $result->get_error_message();
+ if (is_wp_error($result)) return $result->get_error_message();
$wp = new WPFunctions();
$response = $wp->wpRemoteRetrieveBody($result);
$response = substr(trim($response), -strlen(DaemonHttpRunner::PING_SUCCESS_RESPONSE)) === DaemonHttpRunner::PING_SUCCESS_RESPONSE ?
@@ -102,7 +102,7 @@ class CronHelper {
$data
);
$daemon = self::getDaemon();
- if(!$daemon) {
+ if (!$daemon) {
throw new \LogicException('Daemon does not exist.');
}
$daemon['run_accessed_at'] = time();
@@ -117,13 +117,13 @@ class CronHelper {
*/
static function isDaemonAccessible() {
$daemon = self::getDaemon();
- if(!$daemon || !isset($daemon['run_accessed_at']) || $daemon['run_accessed_at'] === null) {
+ if (!$daemon || !isset($daemon['run_accessed_at']) || $daemon['run_accessed_at'] === null) {
return null;
}
- if($daemon['run_accessed_at'] <= (int)$daemon['run_started_at']) {
+ if ($daemon['run_accessed_at'] <= (int)$daemon['run_started_at']) {
return true;
}
- if(
+ if (
$daemon['run_accessed_at'] + self::DAEMON_REQUEST_TIMEOUT < time() &&
$daemon['run_accessed_at'] > (int)$daemon['run_started_at']
) {
@@ -133,7 +133,7 @@ class CronHelper {
}
static function queryCronUrl($url, $wp = null) {
- if(is_null($wp)) {
+ if (is_null($wp)) {
$wp = new WPFunctions();
}
$args = $wp->applyFilters(
@@ -149,7 +149,7 @@ class CronHelper {
}
static function getCronUrl($action, $data = false, $wp = null) {
- if(is_null($wp)) {
+ if (is_null($wp)) {
$wp = new WPFunctions();
}
$url = Router::buildRequest(
@@ -169,26 +169,26 @@ class CronHelper {
$site_url = ($site_url) ? $site_url : home_url();
$parsed_url = parse_url($site_url);
$scheme = '';
- if($parsed_url['scheme'] === 'https') {
+ if ($parsed_url['scheme'] === 'https') {
$scheme = 'ssl://';
}
// 1. if site URL does not contain a port, return the URL
- if(empty($parsed_url['port'])) return $site_url;
+ if (empty($parsed_url['port'])) return $site_url;
// 2. if site URL contains valid port, try connecting to it
$fp = @fsockopen($scheme . $parsed_url['host'], $parsed_url['port'], $errno, $errstr, 1);
- if($fp) return $site_url;
+ if ($fp) return $site_url;
// 3. if connection fails, attempt to connect the standard port derived from URL
// schema
$port = (strtolower($parsed_url['scheme']) === 'http') ? 80 : 443;
$fp = @fsockopen($scheme . $parsed_url['host'], $port, $errno, $errstr, 1);
- if($fp) return sprintf('%s://%s', $parsed_url['scheme'], $parsed_url['host']);
+ if ($fp) return sprintf('%s://%s', $parsed_url['scheme'], $parsed_url['host']);
// 4. throw an error if all connection attempts failed
throw new \Exception(__('Site URL is unreachable.', 'mailpoet'));
}
static function enforceExecutionLimit($timer) {
$elapsed_time = microtime(true) - $timer;
- if($elapsed_time >= self::DAEMON_EXECUTION_LIMIT) {
+ if ($elapsed_time >= self::DAEMON_EXECUTION_LIMIT) {
throw new \Exception(__('Maximum execution time has been reached.', 'mailpoet'));
}
}
diff --git a/lib/Cron/CronTrigger.php b/lib/Cron/CronTrigger.php
index 05090d1e75..b721e13739 100644
--- a/lib/Cron/CronTrigger.php
+++ b/lib/Cron/CronTrigger.php
@@ -4,7 +4,7 @@ namespace MailPoet\Cron;
use MailPoet\Models\Setting;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class CronTrigger {
public $current_method;
diff --git a/lib/Cron/Daemon.php b/lib/Cron/Daemon.php
index 8778d86771..dbf0049368 100644
--- a/lib/Cron/Daemon.php
+++ b/lib/Cron/Daemon.php
@@ -3,7 +3,7 @@ namespace MailPoet\Cron;
use MailPoet\Cron\Workers\WorkersFactory;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Daemon {
public $timer;
diff --git a/lib/Cron/DaemonHttpRunner.php b/lib/Cron/DaemonHttpRunner.php
index b2dfd355a5..9ac3fca4bd 100644
--- a/lib/Cron/DaemonHttpRunner.php
+++ b/lib/Cron/DaemonHttpRunner.php
@@ -1,7 +1,7 @@
addCacheHeaders();
- if(!$request_data) {
+ if (!$request_data) {
$error = __('Invalid or missing request data.', 'mailpoet');
} else {
- if(!$this->settings_daemon_data) {
+ if (!$this->settings_daemon_data) {
$error = __('Daemon does not exist.', 'mailpoet');
} else {
- if(!isset($request_data['token']) ||
+ if (!isset($request_data['token']) ||
$request_data['token'] !== $this->settings_daemon_data['token']
) {
$error = 'Invalid or missing token.';
}
}
}
- if(!empty($error)) {
+ if (!empty($error)) {
return $this->abortWithError($error);
}
$this->settings_daemon_data['token'] = $this->token;
@@ -52,12 +52,12 @@ class DaemonHttpRunner {
// if workers took less time to execute than the daemon execution limit,
// pause daemon execution to ensure that daemon runs only once every X seconds
$elapsed_time = microtime(true) - $this->timer;
- if($elapsed_time < CronHelper::DAEMON_EXECUTION_LIMIT) {
+ if ($elapsed_time < CronHelper::DAEMON_EXECUTION_LIMIT) {
$this->pauseExecution(CronHelper::DAEMON_EXECUTION_LIMIT - $elapsed_time);
}
// after each execution, re-read daemon data in case it changed
$settings_daemon_data = CronHelper::getDaemon();
- if($this->shouldTerminateExecution($settings_daemon_data)) {
+ if ($this->shouldTerminateExecution($settings_daemon_data)) {
return $this->terminateRequest();
}
return $this->callSelf();
@@ -93,7 +93,7 @@ class DaemonHttpRunner {
}
private function addCacheHeaders() {
- if(headers_sent()) {
+ if (headers_sent()) {
return;
}
// Common Cache Control header. Should be respected by cache proxies and CDNs.
diff --git a/lib/Cron/Supervisor.php b/lib/Cron/Supervisor.php
index 13f699be06..a96b655000 100644
--- a/lib/Cron/Supervisor.php
+++ b/lib/Cron/Supervisor.php
@@ -1,7 +1,7 @@
= CronHelper::DAEMON_EXECUTION_TIMEOUT;
$daemon_is_inactive =
isset($daemon['status']) && $daemon['status'] === CronHelper::DAEMON_STATUS_INACTIVE;
- if($execution_timeout_exceeded || $daemon_is_inactive) {
+ if ($execution_timeout_exceeded || $daemon_is_inactive) {
CronHelper::restartDaemon($this->token);
return $this->runDaemon();
}
@@ -33,7 +33,7 @@ class Supervisor {
function getDaemon() {
$daemon = CronHelper::getDaemon();
- if(!$daemon) {
+ if (!$daemon) {
CronHelper::createDaemon($this->token);
return $this->runDaemon();
}
diff --git a/lib/Cron/Triggers/MailPoet.php b/lib/Cron/Triggers/MailPoet.php
index 68a384d03e..928d581474 100644
--- a/lib/Cron/Triggers/MailPoet.php
+++ b/lib/Cron/Triggers/MailPoet.php
@@ -3,7 +3,7 @@ namespace MailPoet\Cron\Triggers;
use MailPoet\Cron\Supervisor;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class MailPoet {
static function run() {
diff --git a/lib/Cron/Triggers/WordPress.php b/lib/Cron/Triggers/WordPress.php
index fb41b0c133..c414ac3915 100644
--- a/lib/Cron/Triggers/WordPress.php
+++ b/lib/Cron/Triggers/WordPress.php
@@ -14,7 +14,7 @@ use MailPoet\Models\Setting;
use MailPoet\Services\Bridge;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class WordPress {
static function run() {
@@ -68,7 +68,7 @@ class WordPress {
static function stop() {
$cron_daemon = CronHelper::getDaemon();
- if($cron_daemon) {
+ if ($cron_daemon) {
CronHelper::deactivateDaemon($cron_daemon);
}
}
diff --git a/lib/Cron/Workers/Bounce.php b/lib/Cron/Workers/Bounce.php
index d3430a001a..93554aa0aa 100644
--- a/lib/Cron/Workers/Bounce.php
+++ b/lib/Cron/Workers/Bounce.php
@@ -13,7 +13,7 @@ use MailPoet\Services\Bridge;
use MailPoet\Services\Bridge\API;
use function MailPoet\Util\array_column;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Bounce extends SimpleWorker {
const TASK_TYPE = 'bounce';
@@ -26,7 +26,7 @@ class Bounce extends SimpleWorker {
public $api;
function init() {
- if(!$this->api) {
+ if (!$this->api) {
$mailer_config = Mailer::getMailerConfig();
$this->api = new API($mailer_config['mailpoet_api_key']);
}
@@ -39,7 +39,7 @@ class Bounce extends SimpleWorker {
function prepareTask(ScheduledTask $task) {
BounceTask::prepareSubscribers($task);
- if(!ScheduledTaskSubscriber::getUnprocessedCount($task->id)) {
+ if (!ScheduledTaskSubscriber::getUnprocessedCount($task->id)) {
$task->delete();
return false;
}
@@ -50,7 +50,7 @@ class Bounce extends SimpleWorker {
function processTask(ScheduledTask $task) {
$subscriber_batches = new BatchIterator($task->id, self::BATCH_SIZE);
- if(count($subscriber_batches) === 0) {
+ if (count($subscriber_batches) === 0) {
$task->delete();
return false;
}
@@ -82,10 +82,10 @@ class Bounce extends SimpleWorker {
function processApiResponse(array $checked_emails) {
foreach ($checked_emails as $email) {
- if(!isset($email['address'], $email['bounce'])) {
+ if (!isset($email['address'], $email['bounce'])) {
continue;
}
- if($email['bounce'] === self::BOUNCED_HARD) {
+ if ($email['bounce'] === self::BOUNCED_HARD) {
$subscriber = Subscriber::findOne($email['address']);
$subscriber->status = Subscriber::STATUS_BOUNCED;
$subscriber->save();
diff --git a/lib/Cron/Workers/KeyCheck/KeyCheckWorker.php b/lib/Cron/Workers/KeyCheck/KeyCheckWorker.php
index 4b1587bf2b..94909a6c39 100644
--- a/lib/Cron/Workers/KeyCheck/KeyCheckWorker.php
+++ b/lib/Cron/Workers/KeyCheck/KeyCheckWorker.php
@@ -6,7 +6,7 @@ use MailPoet\Cron\Workers\SimpleWorker;
use MailPoet\Models\ScheduledTask;
use MailPoet\Services\Bridge;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
abstract class KeyCheckWorker extends SimpleWorker {
const UNAVAILABLE_SERVICE_RESCHEDULE_TIMEOUT = 60;
@@ -14,7 +14,7 @@ abstract class KeyCheckWorker extends SimpleWorker {
public $bridge;
function init() {
- if(!$this->bridge) {
+ if (!$this->bridge) {
$this->bridge = new Bridge();
}
}
@@ -26,7 +26,7 @@ abstract class KeyCheckWorker extends SimpleWorker {
$result = false;
}
- if(empty($result['code']) || $result['code'] == Bridge::CHECK_ERROR_UNAVAILABLE) {
+ if (empty($result['code']) || $result['code'] == Bridge::CHECK_ERROR_UNAVAILABLE) {
$this->reschedule($task, self::UNAVAILABLE_SERVICE_RESCHEDULE_TIMEOUT);
return false;
}
diff --git a/lib/Cron/Workers/KeyCheck/PremiumKeyCheck.php b/lib/Cron/Workers/KeyCheck/PremiumKeyCheck.php
index 5a29b81df8..e7e97a6ffe 100644
--- a/lib/Cron/Workers/KeyCheck/PremiumKeyCheck.php
+++ b/lib/Cron/Workers/KeyCheck/PremiumKeyCheck.php
@@ -5,7 +5,7 @@ use MailPoet\Models\Setting;
use MailPoet\Services\Bridge;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class PremiumKeyCheck extends KeyCheckWorker {
const TASK_TYPE = 'premium_key_check';
diff --git a/lib/Cron/Workers/KeyCheck/SendingServiceKeyCheck.php b/lib/Cron/Workers/KeyCheck/SendingServiceKeyCheck.php
index 6f3189ce54..c9d91a508a 100644
--- a/lib/Cron/Workers/KeyCheck/SendingServiceKeyCheck.php
+++ b/lib/Cron/Workers/KeyCheck/SendingServiceKeyCheck.php
@@ -4,7 +4,7 @@ namespace MailPoet\Cron\Workers\KeyCheck;
use MailPoet\Mailer\Mailer;
use MailPoet\Services\Bridge;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class SendingServiceKeyCheck extends KeyCheckWorker {
const TASK_TYPE = 'sending_service_key_check';
diff --git a/lib/Cron/Workers/Scheduler.php b/lib/Cron/Workers/Scheduler.php
index 01333bbc73..cebe222d71 100644
--- a/lib/Cron/Workers/Scheduler.php
+++ b/lib/Cron/Workers/Scheduler.php
@@ -15,7 +15,7 @@ use MailPoet\Tasks\Sending as SendingTask;
use MailPoet\Newsletter\Scheduler\Scheduler as NewsletterScheduler;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Scheduler {
public $timer;
@@ -32,11 +32,11 @@ class Scheduler {
function process() {
$scheduled_queues = self::getScheduledQueues();
- if(!count($scheduled_queues)) return false;
+ if (!count($scheduled_queues)) return false;
$this->updateTasks($scheduled_queues);
foreach ($scheduled_queues as $i => $queue) {
$newsletter = Newsletter::findOneWithOptions($queue->newsletter_id);
- if(!$newsletter || $newsletter->deleted_at !== null) {
+ if (!$newsletter || $newsletter->deleted_at !== null) {
$queue->delete();
} elseif ($newsletter->status !== Newsletter::STATUS_ACTIVE && $newsletter->status !== Newsletter::STATUS_SCHEDULED) {
continue;
@@ -55,18 +55,18 @@ class Scheduler {
function processWelcomeNewsletter($newsletter, $queue) {
$subscribers = $queue->getSubscribers();
- if(empty($subscribers[0])) {
+ if (empty($subscribers[0])) {
$queue->delete();
return false;
}
$subscriber_id = (int)$subscribers[0];
- if($newsletter->event === 'segment') {
- if($this->verifyMailpoetSubscriber($subscriber_id, $newsletter, $queue) === false) {
+ if ($newsletter->event === 'segment') {
+ if ($this->verifyMailpoetSubscriber($subscriber_id, $newsletter, $queue) === false) {
return false;
}
} else {
- if($newsletter->event === 'user') {
- if($this->verifyWPSubscriber($subscriber_id, $newsletter, $queue) === false) {
+ if ($newsletter->event === 'user') {
+ if ($this->verifyWPSubscriber($subscriber_id, $newsletter, $queue) === false) {
return false;
}
}
@@ -83,7 +83,7 @@ class Scheduler {
);
// ensure that segments exist
$segments = $newsletter->segments()->findMany();
- if(empty($segments)) {
+ if (empty($segments)) {
Logger::getLogger('post-notifications')->addInfo(
'post notification no segments',
['newsletter_id' => $newsletter->id, 'task_id' => $queue->task_id]
@@ -96,7 +96,7 @@ class Scheduler {
$finder = new SubscribersFinder();
$subscribers_count = $finder->addSubscribersToTaskFromSegments($queue->task(), $segments);
- if(empty($subscribers_count)) {
+ if (empty($subscribers_count)) {
Logger::getLogger('post-notifications')->addInfo(
'post notification no subscribers',
['newsletter_id' => $newsletter->id, 'task_id' => $queue->task_id]
@@ -106,7 +106,7 @@ class Scheduler {
// create a duplicate newsletter that acts as a history record
$notification_history = $this->createNotificationHistory($newsletter->id);
- if(!$notification_history) return false;
+ if (!$notification_history) return false;
// queue newsletter for delivery
$queue->newsletter_id = $notification_history->id;
@@ -122,11 +122,11 @@ class Scheduler {
}
function processScheduledAutomaticEmail($newsletter, $queue) {
- if($newsletter->sendTo === 'segment') {
+ if ($newsletter->sendTo === 'segment') {
$segment = Segment::findOne($newsletter->segment);
$finder = new SubscribersFinder();
$result = $finder->addSubscribersToTaskFromSegments($queue->task(), [$segment]);
- if(empty($result)) {
+ if (empty($result)) {
$queue->delete();
return false;
}
@@ -135,7 +135,7 @@ class Scheduler {
$subscriber = (!empty($subscribers) && is_array($subscribers)) ?
Subscriber::findOne($subscribers[0]) :
false;
- if(!$subscriber) {
+ if (!$subscriber) {
$queue->delete();
return false;
}
@@ -167,12 +167,12 @@ class Scheduler {
->where('segment_id', $newsletter->segment)
->where('status', 'subscribed')
->findOne();
- if(!$subscriber || !$subscriber_in_segment) {
+ if (!$subscriber || !$subscriber_in_segment) {
$queue->delete();
return false;
}
// check if subscriber is confirmed (subscribed)
- if($subscriber->status !== Subscriber::STATUS_SUBSCRIBED) {
+ if ($subscriber->status !== Subscriber::STATUS_SUBSCRIBED) {
// reschedule delivery in 5 minutes
$scheduled_at = Carbon::createFromTimestamp($this->wp->currentTime('timestamp'));
$queue->scheduled_at = $scheduled_at->addMinutes(
@@ -187,12 +187,12 @@ class Scheduler {
function verifyWPSubscriber($subscriber_id, $newsletter, $queue) {
// check if user has the proper role
$subscriber = Subscriber::findOne($subscriber_id);
- if(!$subscriber || $subscriber->isWPUser() === false) {
+ if (!$subscriber || $subscriber->isWPUser() === false) {
$queue->delete();
return false;
}
$wp_user = (array)get_userdata($subscriber->wp_user_id);
- if($newsletter->role !== \MailPoet\Newsletter\Scheduler\Scheduler::WORDPRESS_ALL_ROLES
+ if ($newsletter->role !== \MailPoet\Newsletter\Scheduler\Scheduler::WORDPRESS_ALL_ROLES
&& !in_array($newsletter->role, $wp_user['roles'])
) {
$queue->delete();
@@ -202,12 +202,12 @@ class Scheduler {
}
function deleteQueueOrUpdateNextRunDate($queue, $newsletter) {
- if($newsletter->intervalType === NewsletterScheduler::INTERVAL_IMMEDIATELY) {
+ if ($newsletter->intervalType === NewsletterScheduler::INTERVAL_IMMEDIATELY) {
$queue->delete();
return;
} else {
$next_run_date = NewsletterScheduler::getNextRunDate($newsletter->schedule);
- if(!$next_run_date) {
+ if (!$next_run_date) {
$queue->delete();
return;
}
diff --git a/lib/Cron/Workers/SendingQueue/Migration.php b/lib/Cron/Workers/SendingQueue/Migration.php
index 25c23496b2..9d776fa058 100644
--- a/lib/Cron/Workers/SendingQueue/Migration.php
+++ b/lib/Cron/Workers/SendingQueue/Migration.php
@@ -10,7 +10,7 @@ use MailPoet\Models\ScheduledTaskSubscriber;
use MailPoet\Models\SendingQueue;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Migration extends SimpleWorker {
const TASK_TYPE = 'migration';
@@ -27,12 +27,12 @@ class Migration extends SimpleWorker {
$unmigrated_queues_count = 0;
$unmigrated_queue_subscribers = [];
- if($unmigrated_columns) {
+ if ($unmigrated_columns) {
$unmigrated_queues_count = $this->getUnmigratedQueues()->count();
$unmigrated_queue_subscribers = $this->getTaskIdsForUnmigratedSubscribers();
}
- if(!$unmigrated_columns ||
+ if (!$unmigrated_columns ||
($unmigrated_queues_count == 0
&& count($unmigrated_queue_subscribers) == 0)
) {
@@ -50,7 +50,7 @@ class Migration extends SimpleWorker {
function pauseSending() {
$mailer_log = MailerLog::getMailerLog();
- if(MailerLog::isSendingPaused($mailer_log)) {
+ if (MailerLog::isSendingPaused($mailer_log)) {
// sending is already paused
return false;
}
@@ -64,13 +64,13 @@ class Migration extends SimpleWorker {
function resumeSending() {
$mailer_log = MailerLog::getMailerLog();
- if(!MailerLog::isSendingPaused($mailer_log)) {
+ if (!MailerLog::isSendingPaused($mailer_log)) {
// sending is not paused
return false;
}
$error = MailerLog::getError($mailer_log);
// only resume sending if it was paused by migration
- if(isset($error['operation']) && $error['operation'] === 'migration') {
+ if (isset($error['operation']) && $error['operation'] === 'migration') {
return MailerLog::resumeSending();
}
}
@@ -130,7 +130,7 @@ class Migration extends SimpleWorker {
'deleted_at'
);
- if(!empty($queues)) {
+ if (!empty($queues)) {
foreach (array_chunk($queues, self::BATCH_SIZE) as $queue_batch) {
// abort if execution limit is reached
CronHelper::enforceExecutionLimit($this->timer);
@@ -170,7 +170,7 @@ class Migration extends SimpleWorker {
$task_ids = $this->getTaskIdsForUnmigratedSubscribers();
// check if subscribers for each one were already migrated
- if(!empty($task_ids)) {
+ if (!empty($task_ids)) {
$task_ids = $wpdb->get_col(sprintf(
'SELECT queues.`task_id` FROM %1$s queues WHERE queues.`task_id` IN(' . join(',', array_map('intval', $task_ids)) . ') ' .
'AND queues.`count_total` > (SELECT COUNT(*) FROM %2$s subs WHERE subs.`task_id` = queues.`task_id`)',
@@ -179,7 +179,7 @@ class Migration extends SimpleWorker {
));
}
- if(!empty($task_ids)) {
+ if (!empty($task_ids)) {
foreach ($task_ids as $task_id) {
// abort if execution limit is reached
CronHelper::enforceExecutionLimit($this->timer);
@@ -207,13 +207,13 @@ class Migration extends SimpleWorker {
));
// sanity check
- if(empty($subscribers)) {
+ if (empty($subscribers)) {
return false;
}
$subscribers = unserialize($subscribers);
- if(!empty($subscribers['to_process'])) {
+ if (!empty($subscribers['to_process'])) {
$subscribers_to_migrate = array_slice($subscribers['to_process'], $migrated_unprocessed_count);
foreach ($subscribers_to_migrate as $sub_id) {
// abort if execution limit is reached
@@ -227,7 +227,7 @@ class Migration extends SimpleWorker {
}
}
- if(!empty($subscribers['processed'])) {
+ if (!empty($subscribers['processed'])) {
$subscribers_to_migrate = array_slice($subscribers['processed'], $migrated_processed_count);
foreach ($subscribers_to_migrate as $sub_id) {
// abort if execution limit is reached
@@ -245,7 +245,7 @@ class Migration extends SimpleWorker {
}
static function getNextRunDate($wp = null) {
- if(is_null($wp)) {
+ if (is_null($wp)) {
$wp = new WPFunctions();
}
// run migration immediately
diff --git a/lib/Cron/Workers/SendingQueue/SendingErrorHandler.php b/lib/Cron/Workers/SendingQueue/SendingErrorHandler.php
index df0265bf52..36584f9306 100644
--- a/lib/Cron/Workers/SendingQueue/SendingErrorHandler.php
+++ b/lib/Cron/Workers/SendingQueue/SendingErrorHandler.php
@@ -12,14 +12,14 @@ class SendingErrorHandler {
array $prepared_subscribers_ids,
array $prepared_subscribers
) {
- if($error->getLevel() === MailerError::LEVEL_HARD) {
+ if ($error->getLevel() === MailerError::LEVEL_HARD) {
return $this->processHardError($error);
}
$this->processSoftError($error, $sending_task, $prepared_subscribers_ids, $prepared_subscribers);
}
private function processHardError(MailerError $error) {
- if($error->getRetryInterval() !== null) {
+ if ($error->getRetryInterval() !== null) {
MailerLog::processNonBlockingError($error->getOperation(), $error->getMessageWithFailedSubscribers(), $error->getRetryInterval());
} else {
MailerLog::processError($error->getOperation(), $error->getMessageWithFailedSubscribers());
diff --git a/lib/Cron/Workers/SendingQueue/SendingQueue.php b/lib/Cron/Workers/SendingQueue/SendingQueue.php
index 5a9c001997..70ea7e6089 100644
--- a/lib/Cron/Workers/SendingQueue/SendingQueue.php
+++ b/lib/Cron/Workers/SendingQueue/SendingQueue.php
@@ -17,7 +17,7 @@ use MailPoet\Tasks\Sending as SendingTask;
use MailPoet\Tasks\Subscribers\BatchIterator;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class SendingQueue {
public $mailer_task;
@@ -46,16 +46,16 @@ class SendingQueue {
function process() {
$this->enforceSendingAndExecutionLimits();
foreach (self::getRunningQueues() as $queue) {
- if(!$queue instanceof SendingTask) continue;
+ if (!$queue instanceof SendingTask) continue;
ScheduledTaskModel::touchAllByIds(array($queue->task_id));
$newsletter = $this->newsletter_task->getNewsletterFromQueue($queue);
- if(!$newsletter) {
+ if (!$newsletter) {
continue;
}
// pre-process newsletter (render, replace shortcodes/links, etc.)
$newsletter = $this->newsletter_task->preProcessNewsletter($newsletter, $queue);
- if(!$newsletter) {
+ if (!$newsletter) {
Logger::getLogger('newsletters')->addInfo(
'delete task in sending queue',
['task_id' => $queue->task_id]
@@ -72,7 +72,7 @@ class SendingQueue {
// get subscribers
$subscriber_batches = new BatchIterator($queue->task_id, $this->batch_size);
foreach ($subscriber_batches as $subscribers_to_process_ids) {
- if(!empty($newsletter_segments_ids[0])) {
+ if (!empty($newsletter_segments_ids[0])) {
// Check that subscribers are in segments
$finder = new SubscribersFinder();
$found_subscribers_ids = $finder->findSubscribersInSegments($subscribers_to_process_ids, $newsletter_segments_ids);
@@ -87,13 +87,13 @@ class SendingQueue {
$found_subscribers_ids = SubscriberModel::extractSubscribersIds($found_subscribers);
}
// if some subscribers weren't found, remove them from the processing list
- if(count($found_subscribers_ids) !== count($subscribers_to_process_ids)) {
+ if (count($found_subscribers_ids) !== count($subscribers_to_process_ids)) {
$subscribers_to_remove = array_diff(
$subscribers_to_process_ids,
$found_subscribers_ids
);
$queue->removeSubscribers($subscribers_to_remove);
- if(!$queue->count_to_process) {
+ if (!$queue->count_to_process) {
$this->newsletter_task->markNewsletterAsSent($newsletter, $queue);
continue;
}
@@ -103,7 +103,7 @@ class SendingQueue {
$_newsletter,
$found_subscribers
);
- if($queue->status === ScheduledTaskModel::STATUS_COMPLETED) {
+ if ($queue->status === ScheduledTaskModel::STATUS_COMPLETED) {
$this->newsletter_task->markNewsletterAsSent($newsletter, $queue);
$this->stats_notifications_scheduler->schedule($newsletter);
}
@@ -141,7 +141,7 @@ class SendingQueue {
'subscriber_id' => $subscriber->id,
'queue_id' => $queue->id
);
- if($processing_method === 'individual') {
+ if ($processing_method === 'individual') {
$queue = $this->sendNewsletter(
$queue,
$prepared_subscribers_ids[0],
@@ -157,7 +157,7 @@ class SendingQueue {
$statistics = array();
}
}
- if($processing_method === 'bulk') {
+ if ($processing_method === 'bulk') {
$queue = $this->sendNewsletters(
$queue,
$prepared_subscribers_ids,
@@ -216,7 +216,7 @@ class SendingQueue {
array $statistics
) {
// log error message and schedule retry/pause sending
- if($send_result['response'] === false) {
+ if ($send_result['response'] === false) {
$error = $send_result['error'];
assert($error instanceof MailerError);
// Always switch error level to hard until we implement UI for individual subscriber errors
@@ -224,7 +224,7 @@ class SendingQueue {
$this->error_handler->processError($error, $sending_task, $prepared_subscribers_ids, $prepared_subscribers);
}
// update processed/to process list
- if(!$sending_task->updateProcessedSubscribers($prepared_subscribers_ids)) {
+ if (!$sending_task->updateProcessedSubscribers($prepared_subscribers_ids)) {
MailerLog::processError(
'processed_list_update',
sprintf('QUEUE-%d-PROCESSED-LIST-UPDATE', $sending_task->id),
@@ -237,7 +237,7 @@ class SendingQueue {
// update the sent count
$this->mailer_task->updateSentCount();
// enforce execution limits if queue is still being processed
- if($sending_task->status !== ScheduledTaskModel::STATUS_COMPLETED) {
+ if ($sending_task->status !== ScheduledTaskModel::STATUS_COMPLETED) {
$this->enforceSendingAndExecutionLimits();
}
return $sending_task;
diff --git a/lib/Cron/Workers/SendingQueue/Tasks/Links.php b/lib/Cron/Workers/SendingQueue/Tasks/Links.php
index dc5a4dd7b1..262c23d86d 100644
--- a/lib/Cron/Workers/SendingQueue/Tasks/Links.php
+++ b/lib/Cron/Workers/SendingQueue/Tasks/Links.php
@@ -11,7 +11,7 @@ use MailPoet\Router\Endpoints\Track;
use MailPoet\Newsletter\Links\Links as NewsletterLinks;
use MailPoet\Models\NewsletterLink as NewsletterLinkModel;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Links {
static function process($rendered_newsletter, $newsletter, $queue) {
@@ -41,16 +41,16 @@ class Links {
static function getUnsubscribeUrl($queue, $subscriber_id) {
$subscriber = Subscriber::where('id', $subscriber_id)->findOne();
$settings = new SettingsController();
- if((boolean)$settings->get('tracking.enabled')) {
+ if ((boolean)$settings->get('tracking.enabled')) {
$link_hash = NewsletterLinkModel::where('queue_id', $queue->id)
->where('url', '[link:subscription_unsubscribe_url]')
->findOne()
->hash;
$data = NewsletterLinks::createUrlDataObject(
- $subscriber->id,
+ $subscriber->id,
$subscriber->email,
- $queue->id,
- $link_hash,
+ $queue->id,
+ $link_hash,
false
);
$url = Router::buildRequest(
diff --git a/lib/Cron/Workers/SendingQueue/Tasks/Mailer.php b/lib/Cron/Workers/SendingQueue/Tasks/Mailer.php
index 81719e3148..6289c962ed 100644
--- a/lib/Cron/Workers/SendingQueue/Tasks/Mailer.php
+++ b/lib/Cron/Workers/SendingQueue/Tasks/Mailer.php
@@ -4,7 +4,7 @@ namespace MailPoet\Cron\Workers\SendingQueue\Tasks;
use MailPoet\Mailer\Mailer as MailerFactory;
use MailPoet\Mailer\MailerLog;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Mailer {
public $mailer;
@@ -26,10 +26,10 @@ class Mailer {
$reply_to['name'] = (!empty($newsletter->reply_to_name)) ?
$newsletter->reply_to_name :
false;
- if(!$sender['address']) {
+ if (!$sender['address']) {
$sender = false;
}
- if(!$reply_to['address']) {
+ if (!$reply_to['address']) {
$reply_to = false;
}
$this->mailer = new MailerFactory($method = false, $sender, $reply_to);
@@ -55,7 +55,7 @@ class Mailer {
}
function sendBulk($prepared_newsletters, $prepared_subscribers, $extra_params = array()) {
- if($this->getProcessingMethod() === 'individual') {
+ if ($this->getProcessingMethod() === 'individual') {
throw new \LogicException('Trying to send a batch with individual processing method');
}
return $this->mailer->mailer_instance->send(
@@ -66,7 +66,7 @@ class Mailer {
}
function send($prepared_newsletter, $prepared_subscriber, $extra_params = array()) {
- if($this->getProcessingMethod() === 'bulk') {
+ if ($this->getProcessingMethod() === 'bulk') {
throw new \LogicException('Trying to send an individual email with a bulk processing method');
}
return $this->mailer->mailer_instance->send(
diff --git a/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php b/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php
index ea0ffb2c03..12cdba1f01 100644
--- a/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php
+++ b/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php
@@ -15,7 +15,7 @@ use MailPoet\Settings\SettingsController;
use MailPoet\Util\Helpers;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Newsletter {
public $tracking_enabled;
@@ -27,7 +27,7 @@ class Newsletter {
function __construct(WPFunctions $wp = null) {
$settings = new SettingsController();
$this->tracking_enabled = (boolean)$settings->get('tracking.enabled');
- if($wp == null) {
+ if ($wp == null) {
$wp = new WPFunctions;
}
$this->wp = $wp;
@@ -44,9 +44,9 @@ class Newsletter {
)
)
->findOne();
- if(!$newsletter) return false;
+ if (!$newsletter) return false;
// if this is a notification history, get existing active or sending parent newsletter
- if($newsletter->type == NewsletterModel::TYPE_NOTIFICATION_HISTORY) {
+ if ($newsletter->type == NewsletterModel::TYPE_NOTIFICATION_HISTORY) {
$parent_newsletter = $newsletter->parent()
->whereNull('deleted_at')
->whereAnyIs(
@@ -56,20 +56,20 @@ class Newsletter {
)
)
->findOne();
- if(!$parent_newsletter) return false;
+ if (!$parent_newsletter) return false;
}
return $newsletter;
}
function preProcessNewsletter(\MailPoet\Models\Newsletter $newsletter, $queue) {
// return the newsletter if it was previously rendered
- if(!is_null($queue->getNewsletterRenderedBody())) {
+ if (!is_null($queue->getNewsletterRenderedBody())) {
return (!$queue->validate()) ?
$this->stopNewsletterPreProcessing(sprintf('QUEUE-%d-RENDER', $queue->id)) :
$newsletter;
}
// if tracking is enabled, do additional processing
- if($this->tracking_enabled) {
+ if ($this->tracking_enabled) {
// hook to the newsletter post-processing filter and add tracking image
$this->tracking_image_inserted = OpenTracking::addTrackingImage();
// render newsletter
@@ -92,7 +92,7 @@ class Newsletter {
}
// check if this is a post notification and if it contains posts
$newsletter_contains_posts = strpos($rendered_newsletter['html'], 'data-post-id');
- if($newsletter->type === NewsletterModel::TYPE_NOTIFICATION_HISTORY &&
+ if ($newsletter->type === NewsletterModel::TYPE_NOTIFICATION_HISTORY &&
!$newsletter_contains_posts
) {
// delete notification history record since it will never be sent
@@ -111,19 +111,19 @@ class Newsletter {
);
// if the rendered subject is empty, use a default subject,
// having no subject in a newsletter is considered spammy
- if(empty(trim($queue->newsletter_rendered_subject))) {
+ if (empty(trim($queue->newsletter_rendered_subject))) {
$queue->newsletter_rendered_subject = __('No subject', 'mailpoet');
}
$queue->newsletter_rendered_body = $rendered_newsletter;
$queue->save();
// catch DB errors
$queue_errors = $queue->getErrors();
- if(!$queue_errors) {
+ if (!$queue_errors) {
// verify that the rendered body was successfully saved
$queue = SendingQueueModel::findOne($queue->id);
$queue_errors = ($queue->validate() !== true);
}
- if($queue_errors) {
+ if ($queue_errors) {
$this->stopNewsletterPreProcessing(sprintf('QUEUE-%d-SAVE', $queue->id));
}
return $newsletter;
@@ -147,7 +147,7 @@ class Newsletter {
$subscriber,
$queue
);
- if($this->tracking_enabled) {
+ if ($this->tracking_enabled) {
$prepared_newsletter = NewsletterLinks::replaceSubscriberData(
$subscriber->id,
$queue->id,
@@ -166,7 +166,7 @@ class Newsletter {
function markNewsletterAsSent($newsletter, $queue) {
// if it's a standard or notification history newsletter, update its status
- if($newsletter->type === NewsletterModel::TYPE_STANDARD ||
+ if ($newsletter->type === NewsletterModel::TYPE_STANDARD ||
$newsletter->type === NewsletterModel::TYPE_NOTIFICATION_HISTORY
) {
$newsletter->status = NewsletterModel::STATUS_SENT;
diff --git a/lib/Cron/Workers/SendingQueue/Tasks/Posts.php b/lib/Cron/Workers/SendingQueue/Tasks/Posts.php
index 63dde7994b..f11f96cee6 100644
--- a/lib/Cron/Workers/SendingQueue/Tasks/Posts.php
+++ b/lib/Cron/Workers/SendingQueue/Tasks/Posts.php
@@ -4,11 +4,11 @@ namespace MailPoet\Cron\Workers\SendingQueue\Tasks;
use MailPoet\Models\Newsletter as NewsletterModel;
use MailPoet\Models\NewsletterPost;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Posts {
static function extractAndSave($rendered_newsletter, $newsletter) {
- if($newsletter->type !== NewsletterModel::TYPE_NOTIFICATION_HISTORY) {
+ if ($newsletter->type !== NewsletterModel::TYPE_NOTIFICATION_HISTORY) {
return false;
}
preg_match_all(
@@ -16,7 +16,7 @@ class Posts {
$rendered_newsletter['html'],
$matched_posts_ids);
$matched_posts_ids = $matched_posts_ids[1];
- if(!count($matched_posts_ids)) {
+ if (!count($matched_posts_ids)) {
return false;
}
$newsletter_id = $newsletter->parent_id; // parent post notification
diff --git a/lib/Cron/Workers/SendingQueue/Tasks/Shortcodes.php b/lib/Cron/Workers/SendingQueue/Tasks/Shortcodes.php
index 03663e57fe..1b1b1dac5d 100644
--- a/lib/Cron/Workers/SendingQueue/Tasks/Shortcodes.php
+++ b/lib/Cron/Workers/SendingQueue/Tasks/Shortcodes.php
@@ -4,11 +4,11 @@ namespace MailPoet\Cron\Workers\SendingQueue\Tasks;
use MailPoet\Newsletter\Shortcodes\Shortcodes as NewsletterShortcodes;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Shortcodes {
static function process($content, $content_source = null, $newsletter = null, $subscriber = null, $queue = null) {
$shortcodes = new NewsletterShortcodes($newsletter, $subscriber, $queue);
return $shortcodes->replace($content, $content_source);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cron/Workers/SimpleWorker.php b/lib/Cron/Workers/SimpleWorker.php
index 61b800ef50..5199247a51 100644
--- a/lib/Cron/Workers/SimpleWorker.php
+++ b/lib/Cron/Workers/SimpleWorker.php
@@ -7,7 +7,7 @@ use MailPoet\Cron\CronHelper;
use MailPoet\Models\ScheduledTask;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
abstract class SimpleWorker {
public $timer;
@@ -16,7 +16,7 @@ abstract class SimpleWorker {
const TASK_BATCH_SIZE = 5;
function __construct($timer = false) {
- if(static::TASK_TYPE === null) {
+ if (static::TASK_TYPE === null) {
throw new \Exception('Constant TASK_TYPE is not defined on subclass ' . get_class($this));
}
$this->timer = ($timer) ? $timer : microtime(true);
@@ -33,7 +33,7 @@ abstract class SimpleWorker {
}
function process() {
- if(!$this->checkProcessingRequirements()) {
+ if (!$this->checkProcessingRequirements()) {
return false;
}
@@ -42,7 +42,7 @@ abstract class SimpleWorker {
$scheduled_tasks = self::getScheduledTasks();
$running_tasks = self::getRunningTasks();
- if(!$scheduled_tasks && !$running_tasks) {
+ if (!$scheduled_tasks && !$running_tasks) {
self::schedule();
return false;
}
@@ -62,7 +62,7 @@ abstract class SimpleWorker {
->whereNull('deleted_at')
->where('status', ScheduledTask::STATUS_SCHEDULED)
->findMany();
- if($already_scheduled) {
+ if ($already_scheduled) {
return false;
}
$task = ScheduledTask::create();
@@ -88,7 +88,7 @@ abstract class SimpleWorker {
// abort if execution limit is reached
CronHelper::enforceExecutionLimit($this->timer);
- if($this->processTaskStrategy($task)) {
+ if ($this->processTaskStrategy($task)) {
$this->complete($task);
return true;
}
diff --git a/lib/Cron/Workers/StatsNotifications/Scheduler.php b/lib/Cron/Workers/StatsNotifications/Scheduler.php
index f75ed05e10..e27aab0184 100644
--- a/lib/Cron/Workers/StatsNotifications/Scheduler.php
+++ b/lib/Cron/Workers/StatsNotifications/Scheduler.php
@@ -25,7 +25,7 @@ class Scheduler {
}
function schedule(Newsletter $newsletter) {
- if(!$this->shouldSchedule($newsletter)) {
+ if (!$this->shouldSchedule($newsletter)) {
return false;
}
@@ -42,13 +42,13 @@ class Scheduler {
}
private function shouldSchedule(Newsletter $newsletter) {
- if($this->isDisabled()) {
+ if ($this->isDisabled()) {
return false;
}
- if($this->isTaskScheduled($newsletter->id)) {
+ if ($this->isTaskScheduled($newsletter->id)) {
return false;
}
- if(($newsletter->type !== Newsletter::TYPE_NOTIFICATION) && ($newsletter->type !== Newsletter::TYPE_STANDARD)) {
+ if (($newsletter->type !== Newsletter::TYPE_NOTIFICATION) && ($newsletter->type !== Newsletter::TYPE_STANDARD)) {
return false;
}
return true;
@@ -56,19 +56,19 @@ class Scheduler {
private function isDisabled() {
$settings = $this->settings->get(Worker::SETTINGS_KEY);
- if(!is_array($settings)) {
+ if (!is_array($settings)) {
return true;
}
- if(!isset($settings['enabled'])) {
+ if (!isset($settings['enabled'])) {
return true;
}
- if(!isset($settings['address'])) {
+ if (!isset($settings['address'])) {
return true;
}
- if(empty(trim($settings['address']))) {
+ if (empty(trim($settings['address']))) {
return true;
}
- if(!(bool)$this->settings->get('tracking.enabled')) {
+ if (!(bool)$this->settings->get('tracking.enabled')) {
return true;
}
return !(bool)$settings['enabled'];
diff --git a/lib/Cron/Workers/StatsNotifications/Worker.php b/lib/Cron/Workers/StatsNotifications/Worker.php
index 51725537b6..0426b936d0 100644
--- a/lib/Cron/Workers/StatsNotifications/Worker.php
+++ b/lib/Cron/Workers/StatsNotifications/Worker.php
@@ -47,7 +47,7 @@ class Worker {
try {
$this->mailer->send($this->constructNewsletter($task), $settings['address']);
} catch (\Exception $e) {
- if(WP_DEBUG) {
+ if (WP_DEBUG) {
throw $e;
}
} finally {
@@ -60,7 +60,7 @@ class Worker {
private function constructSenderEmail() {
$url_parts = parse_url(home_url());
$site_name = strtolower($url_parts['host']);
- if(strpos($site_name, 'www.') === 0) {
+ if (strpos($site_name, 'www.') === 0) {
$site_name = substr($site_name, 4);
}
return [
@@ -97,7 +97,7 @@ class Worker {
private function getNewsletter(ScheduledTask $task) {
$statsNotificationModel = $task->statsNotification()->findOne();
$newsletter = $statsNotificationModel->newsletter()->findOne();
- if(!$newsletter) {
+ if (!$newsletter) {
throw new \Exception('Newsletter not found');
}
return $newsletter
@@ -126,7 +126,7 @@ class Worker {
'clicked' => $clicked,
'opened' => $opened,
];
- if($link) {
+ if ($link) {
$context['topLinkClicks'] = (int)$link->clicksCount;
$context['topLink'] = $link->url;
}
diff --git a/lib/Cron/Workers/WooCommerceSync.php b/lib/Cron/Workers/WooCommerceSync.php
index 43e05af2b4..510d728154 100644
--- a/lib/Cron/Workers/WooCommerceSync.php
+++ b/lib/Cron/Workers/WooCommerceSync.php
@@ -6,7 +6,7 @@ use MailPoet\Models\ScheduledTask;
use MailPoet\Segments\WooCommerce as WooCommerceSegment;
use MailPoet\WooCommerce\Helper as WooCommerceHelper;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class WooCommerceSync extends SimpleWorker {
const TASK_TYPE = 'woocommerce_sync';
diff --git a/lib/DI/ContainerConfigurator.php b/lib/DI/ContainerConfigurator.php
index 6f5d145b55..059e829ad7 100644
--- a/lib/DI/ContainerConfigurator.php
+++ b/lib/DI/ContainerConfigurator.php
@@ -106,7 +106,7 @@ class ContainerConfigurator implements IContainerConfigurator {
}
static function getPremiumService($id, ContainerInterface $container = null) {
- if(!$container->has(IContainerConfigurator::PREMIUM_CONTAINER_SERVICE_SLUG)) {
+ if (!$container->has(IContainerConfigurator::PREMIUM_CONTAINER_SERVICE_SLUG)) {
return null;
}
return $container->get(IContainerConfigurator::PREMIUM_CONTAINER_SERVICE_SLUG)->get($id);
diff --git a/lib/DI/ContainerFactory.php b/lib/DI/ContainerFactory.php
index b25b9e9aad..0b0a1335b4 100644
--- a/lib/DI/ContainerFactory.php
+++ b/lib/DI/ContainerFactory.php
@@ -23,7 +23,7 @@ class ContainerFactory {
function getContainer() {
$dump_class = '\\'. $this->configurator->getDumpNamespace() . '\\' . $this->configurator->getDumpClassname();
- if(!$this->debug && class_exists($dump_class)) {
+ if (!$this->debug && class_exists($dump_class)) {
$container = new $dump_class();
} else {
$container = $this->getConfiguredContainer();
diff --git a/lib/DI/ContainerWrapper.php b/lib/DI/ContainerWrapper.php
index 7be76c373b..9b3a69fc02 100644
--- a/lib/DI/ContainerWrapper.php
+++ b/lib/DI/ContainerWrapper.php
@@ -25,7 +25,7 @@ class ContainerWrapper implements ContainerInterface {
try {
return $this->free_container->get($id);
} catch (NotFoundExceptionInterface $e) {
- if(!$this->premium_container) {
+ if (!$this->premium_container) {
throw $e;
}
return $this->premium_container->get($id);
@@ -40,20 +40,20 @@ class ContainerWrapper implements ContainerInterface {
* @return ContainerInterface|null
*/
function getPremiumContainer() {
- if(!$this->premium_container && class_exists(\MailPoet\Premium\DI\ContainerConfigurator::class)) {
+ if (!$this->premium_container && class_exists(\MailPoet\Premium\DI\ContainerConfigurator::class)) {
$this->premium_container = self::createPremiumContainer($this->free_container);
}
return $this->premium_container;
}
static function getInstance($debug = false) {
- if(self::$instance) {
+ if (self::$instance) {
return self::$instance;
}
$free_container_factory = new ContainerFactory(new ContainerConfigurator(), $debug);
$free_container = $free_container_factory->getContainer();
$premium_container = null;
- if(class_exists(\MailPoet\Premium\DI\ContainerConfigurator::class)) {
+ if (class_exists(\MailPoet\Premium\DI\ContainerConfigurator::class)) {
$premium_container = self::createPremiumContainer($free_container, $debug);
}
self::$instance = new ContainerWrapper($free_container, $premium_container);
diff --git a/lib/Form/Block/Base.php b/lib/Form/Block/Base.php
index 60ae682712..722fff6768 100644
--- a/lib/Form/Block/Base.php
+++ b/lib/Form/Block/Base.php
@@ -9,27 +9,27 @@ abstract class Base {
protected static function getInputValidation($block, $extra_rules = array()) {
$rules = array();
- if($block['id'] === 'email') {
+ if ($block['id'] === 'email') {
$rules['required'] = true;
$rules['minlength'] = ModelValidator::EMAIL_MIN_LENGTH;
$rules['maxlength'] = ModelValidator::EMAIL_MAX_LENGTH;
$rules['error-message'] = __('Please specify a valid email address.', 'mailpoet');
}
- if($block['id'] === 'segments') {
+ if ($block['id'] === 'segments') {
$rules['required'] = true;
$rules['mincheck'] = 1;
$rules['group'] = $block['id'];
$rules['required-message'] = __('Please select a list', 'mailpoet');
}
- if(!empty($block['params']['required'])) {
+ if (!empty($block['params']['required'])) {
$rules['required'] = true;
$rules['required-message'] = __('This field is required.', 'mailpoet');
}
- if(!empty($block['params']['validate'])) {
- if($block['params']['validate'] === 'phone') {
+ if (!empty($block['params']['validate'])) {
+ if ($block['params']['validate'] === 'phone') {
$rules['pattern'] = "^[\d\+\-\.\(\)\/\s]*$";
$rules['error-message'] = __('Please specify a valid phone number', 'mailpoet');
} else {
@@ -37,13 +37,13 @@ abstract class Base {
}
}
- if(in_array($block['type'], array('radio', 'checkbox'))) {
+ if (in_array($block['type'], array('radio', 'checkbox'))) {
$rules['group'] = 'custom_field_'.$block['id'];
$rules['errors-container'] = '.mailpoet_error_'.$block['id'];
$rules['required-message'] = __('Please select at least one option', 'mailpoet');
}
- if($block['type'] === 'date') {
+ if ($block['type'] === 'date') {
$rules['group'] = 'custom_field_'.$block['id'];
$rules['errors-container'] = '.mailpoet_error_'.$block['id'];
}
@@ -52,10 +52,10 @@ abstract class Base {
$rules = array_merge($rules, $extra_rules);
- if(!empty($rules)) {
+ if (!empty($rules)) {
$rules = array_unique($rules);
foreach ($rules as $rule => $value) {
- if(is_bool($value)) {
+ if (is_bool($value)) {
$value = ($value) ? 'true' : 'false';
}
$validation[] = 'data-parsley-'.$rule.'="'.$value.'"';
@@ -66,18 +66,18 @@ abstract class Base {
protected static function renderLabel($block) {
$html = '';
- if(
+ if (
isset($block['params']['label_within'])
&& $block['params']['label_within']
) {
return $html;
}
- if(isset($block['params']['label'])
+ if (isset($block['params']['label'])
&& strlen(trim($block['params']['label'])) > 0) {
$html .= '';
$html .= $block['params']['label'];
- if(isset($block['params']['required']) && $block['params']['required']) {
+ if (isset($block['params']['required']) && $block['params']['required']) {
$html .= ' * ';
}
@@ -89,7 +89,7 @@ abstract class Base {
protected static function renderInputPlaceholder($block) {
$html = '';
// if the label is displayed as a placeholder,
- if(
+ if (
isset($block['params']['label_within'])
&& $block['params']['label_within']
) {
@@ -97,7 +97,7 @@ abstract class Base {
$html .= ' placeholder="';
$html .= static::getFieldLabel($block);
// add an asterisk if it's a required field
- if(isset($block['params']['required']) && $block['params']['required']) {
+ if (isset($block['params']['required']) && $block['params']['required']) {
$html .= ' *';
}
$html .= '" ';
@@ -107,7 +107,7 @@ abstract class Base {
// return field name depending on block data
protected static function getFieldName($block = array()) {
- if((int)$block['id'] > 0) {
+ if ((int)$block['id'] > 0) {
return 'cf_'.$block['id'];
} else {
$obfuscator = new FieldNameObfuscator();
@@ -130,11 +130,11 @@ abstract class Base {
protected static function getInputModifiers($block = array()) {
$modifiers = array();
- if(isset($block['params']['readonly']) && $block['params']['readonly']) {
+ if (isset($block['params']['readonly']) && $block['params']['readonly']) {
$modifiers[] = 'readonly';
}
- if(isset($block['params']['disabled']) && $block['params']['disabled']) {
+ if (isset($block['params']['disabled']) && $block['params']['disabled']) {
$modifiers[] = 'disabled';
}
return join(' ', $modifiers);
diff --git a/lib/Form/Block/Checkbox.php b/lib/Form/Block/Checkbox.php
index 2adaa7c71e..2382545e28 100644
--- a/lib/Form/Block/Checkbox.php
+++ b/lib/Form/Block/Checkbox.php
@@ -1,7 +1,7 @@
0) {
$date_format = $block['params']['date_format'];
}
@@ -42,7 +42,7 @@ class Date extends Base {
$month = null;
$year = null;
- if(strlen(trim($value)) > 0) {
+ if (strlen(trim($value)) > 0) {
$value = explode('-', $value);
switch ($block['params']['date_type']) {
@@ -68,7 +68,7 @@ class Date extends Base {
}
foreach ($date_selectors as $date_selector) {
- if($date_selector === 'DD') {
+ if ($date_selector === 'DD') {
$block['selected'] = $day;
$html .= ' null
);
// is default today
- if(!empty($block['params']['is_default_today'])) {
+ if (!empty($block['params']['is_default_today'])) {
$defaults['selected'] = (int)strftime('%d');
}
@@ -209,7 +209,7 @@ class Date extends Base {
static function convertDateToDatetime($date, $date_format) {
$datetime = false;
- if($date_format === 'datetime') {
+ if ($date_format === 'datetime') {
$datetime = $date;
} else {
$parsed_date = explode('/', $date);
@@ -217,7 +217,7 @@ class Date extends Base {
$year_position = array_search('YYYY', $parsed_date_format);
$month_position = array_search('MM', $parsed_date_format);
$day_position = array_search('DD', $parsed_date_format);
- if(count($parsed_date) === 3) {
+ if (count($parsed_date) === 3) {
// create date from any combination of month, day and year
$parsed_date = array(
'year' => $parsed_date[$year_position],
@@ -233,7 +233,7 @@ class Date extends Base {
);
} else if ($date_format === 'MM' && count($parsed_date) === 1) {
// create date from month
- if((int)$parsed_date[$month_position] === 0) {
+ if ((int)$parsed_date[$month_position] === 0) {
$datetime = '';
$parsed_date = false;
} else {
@@ -245,7 +245,7 @@ class Date extends Base {
}
} else if ($date_format === 'YYYY' && count($parsed_date) === 1) {
// create date from year
- if((int)$parsed_date[$year_position] === 0) {
+ if ((int)$parsed_date[$year_position] === 0) {
$datetime = '';
$parsed_date = false;
} else {
@@ -258,17 +258,17 @@ class Date extends Base {
} else {
$parsed_date = false;
}
- if($parsed_date) {
+ if ($parsed_date) {
$year = $parsed_date['year'];
$month = $parsed_date['month'];
$day = $parsed_date['day'];
// if all date parts are set to 0, date value is empty
- if((int)$year === 0 && (int)$month === 0 && (int)$day === 0) {
+ if ((int)$year === 0 && (int)$month === 0 && (int)$day === 0) {
$datetime = '';
} else {
- if((int)$year === 0) $year = date('Y');
- if((int)$month === 0) $month = date('m');
- if((int)$day === 0) $day = date('d');
+ if ((int)$year === 0) $year = date('Y');
+ if ((int)$month === 0) $month = date('m');
+ if ((int)$day === 0) $day = date('d');
$datetime = sprintf(
'%s-%s-%s 00:00:00',
$year,
@@ -278,7 +278,7 @@ class Date extends Base {
}
}
}
- if($datetime !== false && !empty($datetime)) {
+ if ($datetime !== false && !empty($datetime)) {
try {
$datetime = Carbon::parse($datetime)->toDateTimeString();
} catch (\Exception $e) {
diff --git a/lib/Form/Block/Html.php b/lib/Form/Block/Html.php
index c13b892d6c..8e7e8b9985 100644
--- a/lib/Form/Block/Html.php
+++ b/lib/Form/Block/Html.php
@@ -7,11 +7,11 @@ class Html {
$html = '';
$text = '';
- if(isset($block['params']['text']) && $block['params']['text']) {
+ if (isset($block['params']['text']) && $block['params']['text']) {
$text = html_entity_decode($block['params']['text'], ENT_QUOTES);
}
- if(isset($block['params']['nl2br']) && $block['params']['nl2br']) {
+ if (isset($block['params']['nl2br']) && $block['params']['nl2br']) {
$text = nl2br($text);
}
diff --git a/lib/Form/Block/Radio.php b/lib/Form/Block/Radio.php
index d5c2e0fbaa..a59b893927 100644
--- a/lib/Form/Block/Radio.php
+++ b/lib/Form/Block/Radio.php
@@ -1,7 +1,7 @@
';
- if(isset($block['params']['label_within']) && $block['params']['label_within']) {
+ if (isset($block['params']['label_within']) && $block['params']['label_within']) {
$html .= ''.static::getFieldLabel($block).' ';
} else {
- if(empty($block['params']['required']) || !$block['params']['required']) {
+ if (empty($block['params']['required']) || !$block['params']['required']) {
$html .= '- ';
}
}
@@ -29,7 +29,7 @@ class Select extends Base {
);
foreach ($options as $option) {
- if(!empty($option['is_hidden'])) {
+ if (!empty($option['is_hidden'])) {
continue;
}
@@ -41,7 +41,7 @@ class Select extends Base {
$is_disabled = (!empty($option['is_disabled'])) ? ' disabled="disabled"' : '';
- if(is_array($option['value'])) {
+ if (is_array($option['value'])) {
$value = key($option['value']);
$label = reset($option['value']);
} else {
diff --git a/lib/Form/Block/Submit.php b/lib/Form/Block/Submit.php
index 864ca08960..393717616b 100644
--- a/lib/Form/Block/Submit.php
+++ b/lib/Form/Block/Submit.php
@@ -1,7 +1,7 @@
0) {
return strip_tags($form['styles']);
} else {
@@ -47,7 +47,7 @@ class Renderer {
'' . __('Please leave this field empty', 'mailpoet') . ' ' :
'';
foreach ($blocks as $key => $block) {
- if($block['type'] == 'submit' && $settings->get('re_captcha.enabled')) {
+ if ($block['type'] == 'submit' && $settings->get('re_captcha.enabled')) {
$site_key = $settings->get('re_captcha.site_token');
$html .= '
diff --git a/lib/Form/Util/Export.php b/lib/Form/Util/Export.php
index 42b392d373..602bc482d7 100644
--- a/lib/Form/Util/Export.php
+++ b/lib/Form/Util/Export.php
@@ -33,7 +33,7 @@ class Export {
'id="mailpoet_form_iframe"',
'vspace="0"',
'tabindex="0"',
- 'onload="if(window[\'MailPoet\']) MailPoet.Iframe.autoSize(this);"',
+ 'onload="if (window[\'MailPoet\']) MailPoet.Iframe.autoSize(this);"',
'marginwidth="0"',
'marginheight="0"',
'hspace="0"',
diff --git a/lib/Form/Util/FieldNameObfuscator.php b/lib/Form/Util/FieldNameObfuscator.php
index 928c2e826e..396de981cf 100644
--- a/lib/Form/Util/FieldNameObfuscator.php
+++ b/lib/Form/Util/FieldNameObfuscator.php
@@ -24,7 +24,7 @@ class FieldNameObfuscator {
}
private function deobfuscateField($name) {
- if($this->wasFieldObfuscated($name)) {
+ if ($this->wasFieldObfuscated($name)) {
return $this->deobfuscate($name);
} else {
return $name;
diff --git a/lib/Form/Util/Styles.php b/lib/Form/Util/Styles.php
index 26d8a33802..89b7b1216d 100644
--- a/lib/Form/Util/Styles.php
+++ b/lib/Form/Util/Styles.php
@@ -85,7 +85,7 @@ EOL;
}
function render($prefix = '') {
- if(!$this->stylesheet) return;
+ if (!$this->stylesheet) return;
$styles = new CSSParser($this->stylesheet);
$styles = $styles->parse();
$formatted_styles = array();
diff --git a/lib/Form/Widget.php b/lib/Form/Widget.php
index b06b786ee5..5f9a5431e2 100644
--- a/lib/Form/Widget.php
+++ b/lib/Form/Widget.php
@@ -12,7 +12,7 @@ use MailPoet\Settings\SettingsController;
use MailPoet\Util\Security;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Widget extends \WP_Widget {
private $renderer;
@@ -32,7 +32,7 @@ class Widget extends \WP_Widget {
$this->wp = new WPFunctions;
$this->renderer = new \MailPoet\Config\Renderer(!WP_DEBUG, !WP_DEBUG);
$this->settings = new SettingsController();
- if(!is_admin()) {
+ if (!is_admin()) {
$this->setupIframe();
} else {
add_action('widgets_admin_page', array(
@@ -44,7 +44,7 @@ class Widget extends \WP_Widget {
function setupIframe() {
$form_id = (isset($_GET['mailpoet_form_iframe']) ? (int)$_GET['mailpoet_form_iframe'] : 0);
- if(!$form_id || !Form::findOne($form_id)) return;
+ if (!$form_id || !Form::findOne($form_id)) return;
$form_html = $this->widget(
array(
@@ -65,11 +65,11 @@ class Widget extends \WP_Widget {
$language_attributes = array();
$is_rtl = (bool)(function_exists('is_rtl') && is_rtl());
- if($is_rtl) {
+ if ($is_rtl) {
$language_attributes[] = 'dir="rtl"';
}
- if(get_option('html_type') === 'text/html') {
+ if (get_option('html_type') === 'text/html') {
$language_attributes[] = sprintf('lang="%s"', get_bloginfo('language'));
}
@@ -119,7 +119,7 @@ class Widget extends \WP_Widget {
);
$captcha = $this->settings->get('re_captcha');
- if(!empty($captcha['enabled'])) {
+ if (!empty($captcha['enabled'])) {
wp_enqueue_script(
'mailpoet_recaptcha',
self::RECAPTCHA_API_URL,
@@ -136,7 +136,7 @@ class Widget extends \WP_Widget {
$inline_script = <<
{
- if(response.errors.length > 0) {
+ if (response.errors.length > 0) {
MailPoet.Notice.error(
response.errors.map((error) => { return error.message; }),
{ scroll: true }
@@ -257,7 +257,7 @@ EOL;
// turn $args into variables
extract($args);
- if($instance === null) {
+ if ($instance === null) {
$instance = $args;
}
@@ -270,11 +270,11 @@ EOL;
// get form
$form = Form::getPublished()->findOne($instance['form']);
- if(!$form) return '';
+ if (!$form) return '';
$form = $form->asArray();
$form_type = 'widget';
- if(isset($instance['form_type']) && in_array(
+ if (isset($instance['form_type']) && in_array(
$instance['form_type'],
array(
'html',
@@ -289,7 +289,7 @@ EOL;
$body = (isset($form['body']) ? $form['body'] : array());
$output = '';
- if(!empty($body)) {
+ if (!empty($body)) {
$form_id = $this->id_base . '_' . $form['id'];
$data = array(
'form_id' => $form_id,
@@ -333,7 +333,7 @@ EOL;
}
}
- if($form_type === 'widget') {
+ if ($form_type === 'widget') {
echo $output;
} else {
return $output;
diff --git a/lib/Helpscout/Beacon.php b/lib/Helpscout/Beacon.php
index 54e50eb457..b381c53742 100644
--- a/lib/Helpscout/Beacon.php
+++ b/lib/Helpscout/Beacon.php
@@ -8,7 +8,7 @@ use MailPoet\Router\Endpoints\CronDaemon;
use MailPoet\Services\Bridge;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Beacon {
static function getData() {
diff --git a/lib/Listing/BulkActionController.php b/lib/Listing/BulkActionController.php
index e934bcecae..5391a831d5 100644
--- a/lib/Listing/BulkActionController.php
+++ b/lib/Listing/BulkActionController.php
@@ -1,7 +1,7 @@
whereIn($table_name.'.id', $data['selection']);
}
return $custom_query;
@@ -25,7 +25,7 @@ class Handler {
$this->setGroup($model, $data);
$this->setSearch($model, $data);
- if(!empty($data['selection'])) {
+ if (!empty($data['selection'])) {
$model->whereIn($table_name.'.id', $data['selection']);
}
return $model;
@@ -38,7 +38,7 @@ class Handler {
$model = \Model::factory($model_class);
// get groups
$groups = array();
- if(method_exists($model_class, 'groups')) {
+ if (method_exists($model_class, 'groups')) {
$groups = call_user_func_array(
array($model_class, 'groups'),
array($data)
@@ -47,7 +47,7 @@ class Handler {
// get filters
$filters = array();
- if(method_exists($model_class, 'filters')) {
+ if (method_exists($model_class, 'filters')) {
$filters = call_user_func_array(
array($model_class, 'filters'),
array($data)
@@ -55,7 +55,7 @@ class Handler {
}
// get items and total count
- if(method_exists($model_class, 'listingQuery')) {
+ if (method_exists($model_class, 'listingQuery')) {
$custom_query = call_user_func_array(
array($model_class, 'listingQuery'),
array($data)
@@ -93,7 +93,7 @@ class Handler {
}
private function setSearch(\ORMWrapper $model, array $data) {
- if(empty($data['search'])) {
+ if (empty($data['search'])) {
return;
}
return $model->filter('search', $data['search']);
@@ -106,14 +106,14 @@ class Handler {
}
private function setGroup(\ORMWrapper $model, array $data) {
- if($data['group'] === null) {
+ if ($data['group'] === null) {
return;
}
$model->filter('groupBy', $data['group']);
}
private function setFilter(\ORMWrapper $model, array $data) {
- if($data['filter'] === null) {
+ if ($data['filter'] === null) {
return $model;
}
return $model->filter('filterBy', $data['filter']);
@@ -130,7 +130,7 @@ class Handler {
? filter_var($data['sort_by'], FILTER_SANITIZE_STRING)
: '';
- if(empty($sort_by)) {
+ if (empty($sort_by)) {
$sort_by = 'id';
}
diff --git a/lib/Logging/LogHandler.php b/lib/Logging/LogHandler.php
index f8b193b225..f68b8a1d21 100644
--- a/lib/Logging/LogHandler.php
+++ b/lib/Logging/LogHandler.php
@@ -29,7 +29,7 @@ class LogHandler extends AbstractProcessingHandler {
]);
$model->save();
- if($this->getRandom() <= self::LOG_PURGE_PROBABILITY) {
+ if ($this->getRandom() <= self::LOG_PURGE_PROBABILITY) {
$this->purgeOldLogs();
}
}
diff --git a/lib/Logging/Logger.php b/lib/Logging/Logger.php
index 97120ab982..8e9e21766c 100644
--- a/lib/Logging/Logger.php
+++ b/lib/Logging/Logger.php
@@ -35,10 +35,10 @@ class Logger {
* @return \MailPoetVendor\Monolog\Logger
*/
public static function getLogger($name = 'MailPoet', $attach_processors = WP_DEBUG) {
- if(!isset(self::$instance[$name])) {
+ if (!isset(self::$instance[$name])) {
self::$instance[$name] = new \MailPoetVendor\Monolog\Logger($name);
- if($attach_processors) {
+ if ($attach_processors) {
// Adds the line/file/class/method from which the log call originated
self::$instance[$name]->pushProcessor(new IntrospectionProcessor());
// Adds the current request URI, request method and client IP to a log record
diff --git a/lib/Mailer/Mailer.php b/lib/Mailer/Mailer.php
index b5724ae90d..b0a5605927 100644
--- a/lib/Mailer/Mailer.php
+++ b/lib/Mailer/Mailer.php
@@ -9,7 +9,7 @@ use MailPoet\Mailer\Methods\ErrorMappers\SMTPMapper;
use MailPoet\Models\Setting;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Mailer {
public $mailer_config;
@@ -100,11 +100,11 @@ class Mailer {
static function getMailerConfig($mailer = false) {
$settings = new SettingsController();
- if(!$mailer) {
+ if (!$mailer) {
$mailer = $settings->get(self::MAILER_CONFIG_SETTING_NAME);
- if(!$mailer || !isset($mailer['method'])) throw new \Exception(__('Mailer is not configured.', 'mailpoet'));
+ if (!$mailer || !isset($mailer['method'])) throw new \Exception(__('Mailer is not configured.', 'mailpoet'));
}
- if(empty($mailer['frequency'])) {
+ if (empty($mailer['frequency'])) {
$default_settings = $settings->getAllDefaults();
$mailer['frequency'] = $default_settings['mta']['frequency'];
}
@@ -117,9 +117,9 @@ class Mailer {
}
function getSenderNameAndAddress($sender = false) {
- if(empty($sender)) {
+ if (empty($sender)) {
$sender = $this->settings->get('sender', []);
- if(empty($sender['address'])) throw new \Exception(__('Sender name and email are not configured.', 'mailpoet'));
+ if (empty($sender['address'])) throw new \Exception(__('Sender name and email are not configured.', 'mailpoet'));
}
$from_name = $this->encodeAddressNamePart($sender['name']);
return array(
@@ -130,7 +130,7 @@ class Mailer {
}
function getReplyToNameAndAddress($reply_to = array()) {
- if(!$reply_to) {
+ if (!$reply_to) {
$reply_to = $this->settings->get('reply_to');
$reply_to['name'] = (!empty($reply_to['name'])) ?
$reply_to['name'] :
@@ -139,7 +139,7 @@ class Mailer {
$reply_to['address'] :
$this->sender['from_email'];
}
- if(empty($reply_to['address'])) {
+ if (empty($reply_to['address'])) {
$reply_to['address'] = $this->sender['from_email'];
}
$reply_to_name = $this->encodeAddressNamePart($reply_to['name']);
@@ -158,11 +158,11 @@ class Mailer {
function formatSubscriberNameAndEmailAddress($subscriber) {
$subscriber = (is_object($subscriber)) ? $subscriber->asArray() : $subscriber;
- if(!is_array($subscriber)) return $subscriber;
- if(isset($subscriber['address'])) $subscriber['email'] = $subscriber['address'];
+ if (!is_array($subscriber)) return $subscriber;
+ if (isset($subscriber['address'])) $subscriber['email'] = $subscriber['address'];
$first_name = (isset($subscriber['first_name'])) ? $subscriber['first_name'] : '';
$last_name = (isset($subscriber['last_name'])) ? $subscriber['last_name'] : '';
- if(!$first_name && !$last_name) return $subscriber['email'];
+ if (!$first_name && !$last_name) return $subscriber['email'];
$full_name = sprintf('%s %s', $first_name, $last_name);
$full_name = trim(preg_replace('!\s\s+!', ' ', $full_name));
$full_name = $this->encodeAddressNamePart($full_name);
@@ -175,7 +175,7 @@ class Mailer {
}
function encodeAddressNamePart($name) {
- if(mb_detect_encoding($name) === 'ASCII') return $name;
+ if (mb_detect_encoding($name) === 'ASCII') return $name;
// encode non-ASCII string as per RFC 2047 (https://www.ietf.org/rfc/rfc2047.txt)
return sprintf('=?utf-8?B?%s?=', base64_encode($name));
}
diff --git a/lib/Mailer/MailerError.php b/lib/Mailer/MailerError.php
index e9e666d1dc..23acb3cb84 100644
--- a/lib/Mailer/MailerError.php
+++ b/lib/Mailer/MailerError.php
@@ -82,13 +82,13 @@ class MailerError {
function getMessageWithFailedSubscribers() {
$message = $this->message ?: '';
- if(!$this->subscribers_errors) {
+ if (!$this->subscribers_errors) {
return $message;
}
$message .= $this->message ? ' ' : '';
- if(count($this->subscribers_errors) === 1) {
+ if (count($this->subscribers_errors) === 1) {
$message .= __('Unprocessed subscriber:', 'mailpoet') . ' ';
} else {
$message .= __('Unprocessed subscribers:', 'mailpoet') . ' ';
diff --git a/lib/Mailer/MailerLog.php b/lib/Mailer/MailerLog.php
index 966c26540b..d70a2a9316 100644
--- a/lib/Mailer/MailerLog.php
+++ b/lib/Mailer/MailerLog.php
@@ -3,7 +3,7 @@ namespace MailPoet\Mailer;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class MailerLog {
const SETTING_NAME = 'mta_log';
@@ -12,10 +12,10 @@ class MailerLog {
const RETRY_INTERVAL = 120; // seconds
static function getMailerLog($mailer_log = false) {
- if($mailer_log) return $mailer_log;
+ if ($mailer_log) return $mailer_log;
$settings = new SettingsController();
$mailer_log = $settings->get(self::SETTING_NAME);
- if(!$mailer_log) {
+ if (!$mailer_log) {
$mailer_log = self::createMailerLog();
}
return $mailer_log;
@@ -47,14 +47,14 @@ class MailerLog {
static function enforceExecutionRequirements($mailer_log = false) {
$mailer_log = self::getMailerLog($mailer_log);
- if($mailer_log['retry_attempt'] === self::RETRY_ATTEMPTS_LIMIT) {
+ if ($mailer_log['retry_attempt'] === self::RETRY_ATTEMPTS_LIMIT) {
$mailer_log = self::pauseSending($mailer_log);
}
- if(self::isSendingPaused($mailer_log)) {
+ if (self::isSendingPaused($mailer_log)) {
throw new \Exception(__('Sending has been paused.', 'mailpoet'));
}
- if(!is_null($mailer_log['retry_at'])) {
- if(time() <= $mailer_log['retry_at']) {
+ if (!is_null($mailer_log['retry_at'])) {
+ if (time() <= $mailer_log['retry_at']) {
throw new \Exception(__('Sending is waiting to be retried.', 'mailpoet'));
} else {
$mailer_log['retry_at'] = null;
@@ -62,7 +62,7 @@ class MailerLog {
}
}
// ensure that sending frequency has not been reached
- if(self::isSendingLimitReached($mailer_log)) {
+ if (self::isSendingLimitReached($mailer_log)) {
throw new \Exception(__('Sending frequency limit has been reached.', 'mailpoet'));
}
}
@@ -111,7 +111,7 @@ class MailerLog {
$mailer_log['retry_at'] = time() + self::RETRY_INTERVAL;
$mailer_log = self::setError($mailer_log, $operation, $error_message, $error_code);
self::updateMailerLog($mailer_log);
- if($pause_sending) {
+ if ($pause_sending) {
self::pauseSending($mailer_log);
}
self::enforceExecutionRequirements();
@@ -122,7 +122,7 @@ class MailerLog {
'operation' => $operation,
'error_message' => $error_message
);
- if($error_code) {
+ if ($error_code) {
$mailer_log['error']['error_code'] = $error_code;
}
return $mailer_log;
@@ -136,9 +136,9 @@ class MailerLog {
static function incrementSentCount() {
$mailer_log = self::getMailerLog();
// do not increment count if sending limit is reached
- if(self::isSendingLimitReached($mailer_log)) return;
+ if (self::isSendingLimitReached($mailer_log)) return;
// clear previous retry count, errors, etc.
- if($mailer_log['error']) {
+ if ($mailer_log['error']) {
$mailer_log = self::clearSendingErrorLog($mailer_log);
}
(int)$mailer_log['sent']++;
@@ -155,11 +155,11 @@ class MailerLog {
static function isSendingLimitReached($mailer_log = false) {
$mailer_config = Mailer::getMailerConfig();
// do not enforce sending limit for MailPoet's sending method
- if($mailer_config['method'] === Mailer::METHOD_MAILPOET) return false;
+ if ($mailer_config['method'] === Mailer::METHOD_MAILPOET) return false;
$mailer_log = self::getMailerLog($mailer_log);
$elapsed_time = time() - (int)$mailer_log['started'];
- if($mailer_log['sent'] >= $mailer_config['frequency_limit']) {
- if($elapsed_time <= $mailer_config['frequency_interval']) return true;
+ if ($mailer_log['sent'] >= $mailer_config['frequency_limit']) {
+ if ($elapsed_time <= $mailer_config['frequency_interval']) return true;
// reset mailer log as enough time has passed since the limit was reached
self::resetMailerLog();
}
diff --git a/lib/Mailer/Methods/AmazonSES.php b/lib/Mailer/Methods/AmazonSES.php
index ea15357dd3..d0dbdd62f1 100644
--- a/lib/Mailer/Methods/AmazonSES.php
+++ b/lib/Mailer/Methods/AmazonSES.php
@@ -5,7 +5,7 @@ use MailPoet\Mailer\Mailer;
use MailPoet\Mailer\Methods\ErrorMappers\AmazonSESMapper;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class AmazonSES {
public $aws_access_key;
@@ -46,7 +46,7 @@ class AmazonSES {
$this->aws_access_key = $access_key;
$this->aws_secret_key = $secret_key;
$this->aws_region = (in_array($region, $this->available_regions)) ? $region : false;
- if(!$this->aws_region) {
+ if (!$this->aws_region) {
throw new \Exception(__('Unsupported Amazon SES region', 'mailpoet'));
}
$this->aws_endpoint = sprintf('email.%s.amazonaws.com', $this->aws_region);
@@ -76,11 +76,11 @@ class AmazonSES {
$error = $this->error_mapper->getErrorFromException($e, $subscriber);
return Mailer::formatMailerErrorResult($error);
}
- if(is_wp_error($result)) {
+ if (is_wp_error($result)) {
$error = $this->error_mapper->getConnectionError($result->get_error_message());
return Mailer::formatMailerErrorResult($error);
}
- if($this->wp->wpRemoteRetrieveResponseCode($result) !== 200) {
+ if ($this->wp->wpRemoteRetrieveResponseCode($result) !== 200) {
$response = simplexml_load_string($this->wp->wpRemoteRetrieveBody($result));
$error = $this->error_mapper->getErrorFromResponse($response, $subscriber);
return Mailer::formatMailerErrorResult($error);
@@ -111,14 +111,14 @@ class AmazonSES {
))
->setReturnPath($this->return_path)
->setSubject($newsletter['subject']);
- if(!empty($extra_params['unsubscribe_url'])) {
+ if (!empty($extra_params['unsubscribe_url'])) {
$headers = $message->getHeaders();
$headers->addTextHeader('List-Unsubscribe', '<' . $extra_params['unsubscribe_url'] . '>');
}
- if(!empty($newsletter['body']['html'])) {
+ if (!empty($newsletter['body']['html'])) {
$message = $message->setBody($newsletter['body']['html'], 'text/html');
}
- if(!empty($newsletter['body']['text'])) {
+ if (!empty($newsletter['body']['text'])) {
$message = $message->addPart($newsletter['body']['text'], 'text/plain');
}
return $message;
@@ -130,7 +130,7 @@ class AmazonSES {
function processSubscriber($subscriber) {
preg_match('!(?P.*?)\s<(?P.*?)>!', $subscriber, $subscriber_data);
- if(!isset($subscriber_data['email'])) {
+ if (!isset($subscriber_data['email'])) {
$subscriber_data = array(
'email' => $subscriber,
);
diff --git a/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php b/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php
index 7f7c36757f..881600e1d9 100644
--- a/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php
+++ b/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php
@@ -10,7 +10,7 @@ class AmazonSESMapper {
function getErrorFromException(\Exception $e, $subscriber) {
$level = MailerError::LEVEL_HARD;
- if($e instanceof \Swift_RfcComplianceException) {
+ if ($e instanceof \Swift_RfcComplianceException) {
$level = MailerError::LEVEL_SOFT;
}
$subscriber_errors = [new SubscriberError($subscriber, null)];
@@ -27,7 +27,7 @@ class AmazonSESMapper {
sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES);
$level = MailerError::LEVEL_HARD;
- if($response && $response->Error->Code->__toString() === 'MessageRejected') {
+ if ($response && $response->Error->Code->__toString() === 'MessageRejected') {
$level = MailerError::LEVEL_SOFT;
}
$subscriber_errors = [new SubscriberError($subscriber, null)];
diff --git a/lib/Mailer/Methods/ErrorMappers/MailPoetMapper.php b/lib/Mailer/Methods/ErrorMappers/MailPoetMapper.php
index 2bf6c5c5af..0802014d1f 100644
--- a/lib/Mailer/Methods/ErrorMappers/MailPoetMapper.php
+++ b/lib/Mailer/Methods/ErrorMappers/MailPoetMapper.php
@@ -7,7 +7,7 @@ use MailPoet\Services\Bridge\API;
use InvalidArgumentException;
use MailPoet\Util\Helpers;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class MailPoetMapper {
use ConnectionErrorMapperTrait;
@@ -35,7 +35,7 @@ class MailPoetMapper {
case API::RESPONSE_CODE_PAYLOAD_ERROR:
$result_parsed = json_decode($result['message'], true);
$message = __('Error while sending.', 'mailpoet');
- if(!is_array($result_parsed)) {
+ if (!is_array($result_parsed)) {
$message .= ' ' . $result['message'];
break;
}
@@ -68,11 +68,11 @@ class MailPoetMapper {
private function getSubscribersErrors($result_parsed, $subscribers) {
$errors = [];
foreach ($result_parsed as $result_error) {
- if(!is_array($result_error) || !isset($result_error['index']) || !isset($subscribers[$result_error['index']])) {
+ if (!is_array($result_error) || !isset($result_error['index']) || !isset($subscribers[$result_error['index']])) {
throw new InvalidArgumentException( __('Invalid MSS response format.', 'mailpoet'));
}
$subscriber_errors = [];
- if(isset($result_error['errors']) && is_array($result_error['errors'])) {
+ if (isset($result_error['errors']) && is_array($result_error['errors'])) {
array_walk_recursive($result_error['errors'], function($item) use (&$subscriber_errors) {
$subscriber_errors[] = $item;
});
diff --git a/lib/Mailer/Methods/ErrorMappers/PHPMailMapper.php b/lib/Mailer/Methods/ErrorMappers/PHPMailMapper.php
index 065b345875..836801befd 100644
--- a/lib/Mailer/Methods/ErrorMappers/PHPMailMapper.php
+++ b/lib/Mailer/Methods/ErrorMappers/PHPMailMapper.php
@@ -10,7 +10,7 @@ class PHPMailMapper {
function getErrorFromException(\Exception $e, $subscriber) {
$level = MailerError::LEVEL_HARD;
- if(strpos($e->getMessage(), 'Invalid address') === 0) {
+ if (strpos($e->getMessage(), 'Invalid address') === 0) {
$level = MailerError::LEVEL_SOFT;
}
diff --git a/lib/Mailer/Methods/ErrorMappers/SMTPMapper.php b/lib/Mailer/Methods/ErrorMappers/SMTPMapper.php
index 0e29996553..5b0ae7a399 100644
--- a/lib/Mailer/Methods/ErrorMappers/SMTPMapper.php
+++ b/lib/Mailer/Methods/ErrorMappers/SMTPMapper.php
@@ -17,7 +17,7 @@ class SMTPMapper {
$message = explode(PHP_EOL, $e->getMessage());
$level = MailerError::LEVEL_HARD;
- if($e instanceof \Swift_RfcComplianceException) {
+ if ($e instanceof \Swift_RfcComplianceException) {
$level = MailerError::LEVEL_SOFT;
}
$subscriber_errors = [new SubscriberError($subscriber, null)];
@@ -27,7 +27,7 @@ class SMTPMapper {
function getErrorFromLog($log, $subscriber) {
// extract error message from log
preg_match('/!! (.*?)>>/ism', $log, $message);
- if(!empty($message[1])) {
+ if (!empty($message[1])) {
$message = $message[1];
// remove line breaks from the message due to how logger's dump() method works
$message = preg_replace('/\r|\n/', '', $message);
diff --git a/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php b/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php
index 8c513f6d53..3a2110bfa9 100644
--- a/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php
+++ b/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php
@@ -14,7 +14,7 @@ class SendGridMapper {
sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_SENDGRID);
$level = MailerError::LEVEL_HARD;
- if(strpos($response, 'Invalid email address') === 0) {
+ if (strpos($response, 'Invalid email address') === 0) {
$level = MailerError::LEVEL_SOFT;
}
$subscriber_errors = [new SubscriberError($subscriber, null)];
diff --git a/lib/Mailer/Methods/MailPoet.php b/lib/Mailer/Methods/MailPoet.php
index 8d96fffee2..b0238c72d6 100644
--- a/lib/Mailer/Methods/MailPoet.php
+++ b/lib/Mailer/Methods/MailPoet.php
@@ -7,7 +7,7 @@ use MailPoet\Mailer\Methods\ErrorMappers\MailPoetMapper;
use MailPoet\Services\Bridge;
use MailPoet\Services\Bridge\API;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class MailPoet {
public $api;
@@ -27,7 +27,7 @@ class MailPoet {
}
function send($newsletter, $subscriber, $extra_params = array()) {
- if($this->services_checker->isMailPoetAPIKeyValid() === false) {
+ if ($this->services_checker->isMailPoetAPIKeyValid() === false) {
return Mailer::formatMailerErrorResult($this->error_mapper->getInvalidApiKeyError());
}
@@ -48,7 +48,7 @@ class MailPoet {
}
function processSendError($result, $subscriber) {
- if(!empty($result['code']) && $result['code'] === API::RESPONSE_CODE_KEY_INVALID) {
+ if (!empty($result['code']) && $result['code'] === API::RESPONSE_CODE_KEY_INVALID) {
Bridge::invalidateKey();
}
return $this->error_mapper->getErrorForResult($result, $subscriber);
@@ -56,7 +56,7 @@ class MailPoet {
function processSubscriber($subscriber) {
preg_match('!(?P.*?)\s<(?P.*?)>!', $subscriber, $subscriber_data);
- if(!isset($subscriber_data['email'])) {
+ if (!isset($subscriber_data['email'])) {
$subscriber_data = array(
'email' => $subscriber,
);
@@ -85,18 +85,18 @@ class MailPoet {
)),
'subject' => $newsletter['subject']
);
- if(!empty($newsletter['body']['html'])) {
+ if (!empty($newsletter['body']['html'])) {
$body['html'] = $newsletter['body']['html'];
}
- if(!empty($newsletter['body']['text'])) {
+ if (!empty($newsletter['body']['text'])) {
$body['text'] = $newsletter['body']['text'];
}
- if($unsubscribe_url) {
+ if ($unsubscribe_url) {
$body['list_unsubscribe'] = $unsubscribe_url;
}
return $body;
};
- if(is_array($newsletter) && is_array($subscriber)) {
+ if (is_array($newsletter) && is_array($subscriber)) {
$body = array();
for ($record = 0; $record < count($newsletter); $record++) {
$body[] = $composeBody(
diff --git a/lib/Mailer/Methods/PHPMail.php b/lib/Mailer/Methods/PHPMail.php
index 558f49e646..f7284df952 100644
--- a/lib/Mailer/Methods/PHPMail.php
+++ b/lib/Mailer/Methods/PHPMail.php
@@ -5,7 +5,7 @@ namespace MailPoet\Mailer\Methods;
use MailPoet\Mailer\Mailer;
use MailPoet\Mailer\Methods\ErrorMappers\PHPMailMapper;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
require_once ABSPATH . WPINC . '/class-phpmailer.php';
@@ -35,7 +35,7 @@ class PHPMail {
} catch (\Exception $e) {
return Mailer::formatMailerErrorResult($this->error_mapper->getErrorFromException($e, $subscriber));
}
- if($result === true) {
+ if ($result === true) {
return Mailer::formatMailerSendSuccessResult();
} else {
$error = $this->error_mapper->getErrorForSubscriber($subscriber);
@@ -64,7 +64,7 @@ class PHPMail {
$mailer->Body = (!empty($newsletter['body']['html'])) ? $newsletter['body']['html'] : '';
$mailer->AltBody = (!empty($newsletter['body']['text'])) ? $newsletter['body']['text'] : '';
$mailer->Sender = $this->return_path;
- if(!empty($extra_params['unsubscribe_url'])) {
+ if (!empty($extra_params['unsubscribe_url'])) {
$this->mailer->addCustomHeader('List-Unsubscribe', $extra_params['unsubscribe_url']);
}
return $mailer;
@@ -72,7 +72,7 @@ class PHPMail {
function processSubscriber($subscriber) {
preg_match('!(?P.*?)\s<(?P.*?)>!', $subscriber, $subscriber_data);
- if(!isset($subscriber_data['email'])) {
+ if (!isset($subscriber_data['email'])) {
$subscriber_data = array(
'email' => $subscriber,
);
diff --git a/lib/Mailer/Methods/SMTP.php b/lib/Mailer/Methods/SMTP.php
index cb3daeac0a..5854737c9c 100644
--- a/lib/Mailer/Methods/SMTP.php
+++ b/lib/Mailer/Methods/SMTP.php
@@ -5,7 +5,7 @@ use MailPoet\Mailer\Mailer;
use MailPoet\Mailer\Methods\ErrorMappers\SMTPMapper;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class SMTP {
public $host;
@@ -56,7 +56,7 @@ class SMTP {
$this->error_mapper->getErrorFromException($e, $subscriber)
);
}
- if($result === 1) {
+ if ($result === 1) {
return Mailer::formatMailerSendSuccessResult();
} else {
$error = $this->error_mapper->getErrorFromLog($this->mailer_logger->dump(), $subscriber);
@@ -69,7 +69,7 @@ class SMTP {
$this->host, $this->port, $this->encryption);
$connection_timeout = $this->wp->applyFilters('mailpoet_mailer_smtp_connection_timeout', self::SMTP_CONNECTION_TIMEOUT);
$transport->setTimeout($connection_timeout);
- if($this->authentication) {
+ if ($this->authentication) {
$transport
->setUsername($this->login)
->setPassword($this->password);
@@ -94,14 +94,14 @@ class SMTP {
)
->setReturnPath($this->return_path)
->setSubject($newsletter['subject']);
- if(!empty($extra_params['unsubscribe_url'])) {
+ if (!empty($extra_params['unsubscribe_url'])) {
$headers = $message->getHeaders();
$headers->addTextHeader('List-Unsubscribe', '<' . $extra_params['unsubscribe_url'] . '>');
}
- if(!empty($newsletter['body']['html'])) {
+ if (!empty($newsletter['body']['html'])) {
$message = $message->setBody($newsletter['body']['html'], 'text/html');
}
- if(!empty($newsletter['body']['text'])) {
+ if (!empty($newsletter['body']['text'])) {
$message = $message->addPart($newsletter['body']['text'], 'text/plain');
}
return $message;
@@ -109,7 +109,7 @@ class SMTP {
function processSubscriber($subscriber) {
preg_match('!(?P.*?)\s<(?P.*?)>!', $subscriber, $subscriber_data);
- if(!isset($subscriber_data['email'])) {
+ if (!isset($subscriber_data['email'])) {
$subscriber_data = array(
'email' => $subscriber,
);
diff --git a/lib/Mailer/Methods/SendGrid.php b/lib/Mailer/Methods/SendGrid.php
index b064607b4d..c9f9319acd 100644
--- a/lib/Mailer/Methods/SendGrid.php
+++ b/lib/Mailer/Methods/SendGrid.php
@@ -6,7 +6,7 @@ use MailPoet\Mailer\Mailer;
use MailPoet\Mailer\Methods\ErrorMappers\SendGridMapper;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class SendGrid {
public $url = 'https://api.sendgrid.com/api/mail.send.json';
@@ -32,11 +32,11 @@ class SendGrid {
$this->url,
$this->request($newsletter, $subscriber, $extra_params)
);
- if(is_wp_error($result)) {
+ if (is_wp_error($result)) {
$error = $this->error_mapper->getConnectionError($result->get_error_message());
return Mailer::formatMailerErrorResult($error);
}
- if($this->wp->wpRemoteRetrieveResponseCode($result) !== 200) {
+ if ($this->wp->wpRemoteRetrieveResponseCode($result) !== 200) {
$response = json_decode($result['body'], true);
$error = $this->error_mapper->getErrorFromResponse($response, $subscriber);
return Mailer::formatMailerErrorResult($error);
@@ -53,16 +53,16 @@ class SendGrid {
'subject' => $newsletter['subject']
);
$headers = array();
- if(!empty($extra_params['unsubscribe_url'])) {
+ if (!empty($extra_params['unsubscribe_url'])) {
$headers['List-Unsubscribe'] = '<' . $extra_params['unsubscribe_url'] . '>';
}
- if($headers) {
+ if ($headers) {
$body['headers'] = json_encode($headers);
}
- if(!empty($newsletter['body']['html'])) {
+ if (!empty($newsletter['body']['html'])) {
$body['html'] = $newsletter['body']['html'];
}
- if(!empty($newsletter['body']['text'])) {
+ if (!empty($newsletter['body']['text'])) {
$body['text'] = $newsletter['body']['text'];
}
return $body;
diff --git a/lib/Models/CustomField.php b/lib/Models/CustomField.php
index c78a7b7314..f991cd0ac1 100644
--- a/lib/Models/CustomField.php
+++ b/lib/Models/CustomField.php
@@ -3,7 +3,7 @@ namespace MailPoet\Models;
use MailPoet\Form\Block\Date;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
/**
* @property string $type
@@ -31,7 +31,7 @@ class CustomField extends Model {
function asArray() {
$model = parent::asArray();
- if(isset($model['params'])) {
+ if (isset($model['params'])) {
$model['params'] = (is_array($this->params))
? $this->params
: unserialize($this->params);
@@ -40,7 +40,7 @@ class CustomField extends Model {
}
function save() {
- if(is_null($this->params)) {
+ if (is_null($this->params)) {
$this->params = array();
}
$this->set('params', (
@@ -53,7 +53,7 @@ class CustomField extends Model {
function formatValue($value = null) {
// format custom field data depending on type
- if(is_array($value) && $this->type === self::TYPE_DATE) {
+ if (is_array($value) && $this->type === self::TYPE_DATE) {
$custom_field_data = $this->asArray();
$date_format = $custom_field_data['params']['date_format'];
$date_type = (isset($custom_field_data['params']['date_type'])
@@ -80,7 +80,7 @@ class CustomField extends Model {
break;
case 'month':
- if((int)$value['month'] === 0) {
+ if ((int)$value['month'] === 0) {
$value = '';
} else {
$value = sprintf(
@@ -91,7 +91,7 @@ class CustomField extends Model {
break;
case 'day':
- if((int)$value['day'] === 0) {
+ if ((int)$value['day'] === 0) {
$value = '';
} else {
$value = sprintf(
@@ -102,7 +102,7 @@ class CustomField extends Model {
break;
case 'year':
- if((int)$value['year'] === 0) {
+ if ((int)$value['year'] === 0) {
$value = '';
} else {
$value = sprintf(
@@ -113,7 +113,7 @@ class CustomField extends Model {
break;
}
- if(!empty($value)) {
+ if (!empty($value)) {
$value = Date::convertDateToDatetime($value, $date_format);
}
}
@@ -132,7 +132,7 @@ class CustomField extends Model {
static function createOrUpdate($data = array()) {
// set name as label by default
- if(empty($data['params']['label']) && isset($data['name'])) {
+ if (empty($data['params']['label']) && isset($data['name'])) {
$data['params']['label'] = $data['name'];
}
return parent::_createOrUpdate($data);
diff --git a/lib/Models/Form.php b/lib/Models/Form.php
index 0352655583..0ade77700b 100644
--- a/lib/Models/Form.php
+++ b/lib/Models/Form.php
@@ -1,7 +1,7 @@
getBody();
- if(empty($body)) {
+ if (empty($body)) {
return false;
}
@@ -57,13 +57,13 @@ class Form extends Model {
$fields = array();
foreach ((array)$body as $field) {
- if(empty($field['id'])
+ if (empty($field['id'])
|| empty($field['type'])
|| in_array($field['type'], $skipped_types)
) {
continue;
}
- if($field['id'] > 0) {
+ if ($field['id'] > 0) {
$fields[] = 'cf_' . $field['id'];
} else {
$fields[] = $field['id'];
@@ -75,11 +75,11 @@ class Form extends Model {
function filterSegments(array $segment_ids = array()) {
$settings = $this->getSettings();
- if(empty($settings['segments'])) {
+ if (empty($settings['segments'])) {
return array();
}
- if(!empty($settings['segments_selected_by'])
+ if (!empty($settings['segments_selected_by'])
&& $settings['segments_selected_by'] == 'user'
) {
$segment_ids = array_intersect($segment_ids, $settings['segments']);
@@ -110,7 +110,7 @@ class Form extends Model {
}
static function groupBy($orm, $group = null) {
- if($group === 'trash') {
+ if ($group === 'trash') {
return $orm->whereNotNull('deleted_at');
}
return $orm->whereNull('deleted_at');
diff --git a/lib/Models/MappingToExternalEntities.php b/lib/Models/MappingToExternalEntities.php
index 1175a5d3bf..8b927025b2 100644
--- a/lib/Models/MappingToExternalEntities.php
+++ b/lib/Models/MappingToExternalEntities.php
@@ -1,7 +1,7 @@
save();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Models/Model.php b/lib/Models/Model.php
index faf071f65b..0a41c84aeb 100644
--- a/lib/Models/Model.php
+++ b/lib/Models/Model.php
@@ -2,7 +2,7 @@
namespace MailPoet\Models;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
/**
* @method static array|string getConfig($key = null, $connection_name = self::DEFAULT_CONNECTION)
@@ -135,14 +135,14 @@ class Model extends \Sudzy\ValidModel {
static protected function _createOrUpdate($data = array(), $keys = false, $onCreate = false) {
$model = false;
- if(isset($data['id']) && (int)$data['id'] > 0) {
+ if (isset($data['id']) && (int)$data['id'] > 0) {
$model = static::findOne((int)$data['id']);
}
- if(!empty($keys)) {
+ if (!empty($keys)) {
$first = true;
foreach ($keys as $field => $value) {
- if($first) {
+ if ($first) {
$model = static::where($field, $value);
$first = false;
} else {
@@ -152,8 +152,8 @@ class Model extends \Sudzy\ValidModel {
$model = $model->findOne();
}
- if($model === false) {
- if(!empty($onCreate)) {
+ if ($model === false) {
+ if (!empty($onCreate)) {
$data = $onCreate($data);
}
$model = static::create();
@@ -171,7 +171,7 @@ class Model extends \Sudzy\ValidModel {
}
function getErrors() {
- if(empty($this->_errors)) {
+ if (empty($this->_errors)) {
return false;
} else {
return $this->_errors;
@@ -179,11 +179,11 @@ class Model extends \Sudzy\ValidModel {
}
function setError($error = '', $error_code = null) {
- if(!$error_code) {
+ if (!$error_code) {
$error_code = count($this->_errors);
}
- if(!empty($error)) {
- if(is_array($error)) {
+ if (!empty($error)) {
+ if (is_array($error)) {
$this->_errors = array_merge($this->_errors, $error);
$this->_errors = array_unique($this->_errors);
} else {
@@ -203,7 +203,7 @@ class Model extends \Sudzy\ValidModel {
switch ($e->getCode()) {
case 23000:
preg_match("/for key \'(.*?)\'/i", $e->getMessage(), $matches);
- if(isset($matches[1])) {
+ if (isset($matches[1])) {
$column = $matches[1];
$this->setError(
sprintf(
@@ -275,7 +275,7 @@ class Model extends \Sudzy\ValidModel {
static function bulkAction($orm, $callback = false) {
$total = $orm->count();
- if($total === 0) return false;
+ if ($total === 0) return false;
$rows = $orm->select(static::$_table . '.id')
->offset(null)
@@ -286,7 +286,7 @@ class Model extends \Sudzy\ValidModel {
return (int)$model['id'];
}, $rows);
- if(is_callable($callback)) {
+ if (is_callable($callback)) {
$callback($ids);
}
@@ -311,7 +311,7 @@ class Model extends \Sudzy\ValidModel {
}
function setTimestamp() {
- if($this->created_at === null) {
+ if ($this->created_at === null) {
$this->set_expr('created_at', 'NOW()');
}
}
diff --git a/lib/Models/ModelValidator.php b/lib/Models/ModelValidator.php
index 8ac172826a..a326b12c11 100644
--- a/lib/Models/ModelValidator.php
+++ b/lib/Models/ModelValidator.php
@@ -4,7 +4,7 @@ namespace MailPoet\Models;
use MailPoet\Util\Helpers;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class ModelValidator extends \Sudzy\Engine {
public $validators;
@@ -37,7 +37,7 @@ class ModelValidator extends \Sudzy\Engine {
}
function validateRenderedNewsletterBody($newsletter_body) {
- if(is_serialized($newsletter_body)) {
+ if (is_serialized($newsletter_body)) {
$newsletter_body = unserialize($newsletter_body);
} else if (Helpers::isJson($newsletter_body)) {
$newsletter_body = json_decode($newsletter_body, true);
diff --git a/lib/Models/Newsletter.php b/lib/Models/Newsletter.php
index d8e92f9ee5..1ca0c31a1d 100644
--- a/lib/Models/Newsletter.php
+++ b/lib/Models/Newsletter.php
@@ -9,7 +9,7 @@ use MailPoet\Util\Security;
use MailPoet\WP\Emoji;
use function MailPoet\Util\array_column;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
/**
* @property int $id
@@ -99,12 +99,12 @@ class Newsletter extends Model {
}
function save() {
- if(is_string($this->deleted_at) && strlen(trim($this->deleted_at)) === 0) {
+ if (is_string($this->deleted_at) && strlen(trim($this->deleted_at)) === 0) {
$this->set_expr('deleted_at', 'NULL');
}
- if(isset($this->body)) {
- if(is_array($this->body)) {
+ if (isset($this->body)) {
+ if (is_array($this->body)) {
$this->body = json_encode($this->body);
}
$this->set(
@@ -124,7 +124,7 @@ class Newsletter extends Model {
function trash() {
// trash queue associations
$children = $this->children()->select('id')->findArray();
- if($children) {
+ if ($children) {
$this->children()->rawExecute(
'UPDATE `' . self::$_table . '` ' .
'SET `deleted_at` = NOW() ' .
@@ -162,7 +162,7 @@ class Newsletter extends Model {
// bulk trash queue and notification history associations
parent::bulkAction($orm, function($ids) {
$children = Newsletter::whereIn('parent_id', $ids)->select('id')->findArray();
- if($children) {
+ if ($children) {
Newsletter::rawExecute(
'UPDATE `' . Newsletter::$_table . '` ' .
'SET `deleted_at` = NOW() ' .
@@ -200,7 +200,7 @@ class Newsletter extends Model {
function delete() {
// delete queue, notification history and segment associations
$children = $this->children()->select('id')->findArray();
- if($children) {
+ if ($children) {
$children = Helpers::flattenArray($children);
$this->children()->deleteMany();
SendingQueue::getTasks()
@@ -225,7 +225,7 @@ class Newsletter extends Model {
// bulk delete queue, notification history and segment associations
parent::bulkAction($orm, function($ids) {
$children = Newsletter::whereIn('parent_id', $ids)->select('id')->findArray();
- if($children) {
+ if ($children) {
$children = Helpers::flattenArray($children);
Newsletter::whereIn('parent_id', $ids)->deleteMany();
SendingQueue::getTasks()
@@ -250,7 +250,7 @@ class Newsletter extends Model {
function restore() {
// restore trashed queue and notification history associations
$children = $this->children()->select('id')->findArray();
- if($children) {
+ if ($children) {
$this->children()->rawExecute(
'UPDATE `' . self::$_table . '` ' .
'SET `deleted_at` = null ' .
@@ -281,7 +281,7 @@ class Newsletter extends Model {
);
}
- if($this->status == self::STATUS_SENDING) {
+ if ($this->status == self::STATUS_SENDING) {
$this->set('status', self::STATUS_DRAFT);
$this->save();
}
@@ -292,7 +292,7 @@ class Newsletter extends Model {
// bulk restore trashed queue and notification history associations
parent::bulkAction($orm, function($ids) {
$children = Newsletter::whereIn('parent_id', $ids)->select('id')->findArray();
- if($children) {
+ if ($children) {
Newsletter::whereIn('parent_id', $ids)
->whereNotNull('deleted_at')
->findResultSet()
@@ -336,7 +336,7 @@ class Newsletter extends Model {
}
function setStatus($status = null) {
- if(in_array($status, array(
+ if (in_array($status, array(
self::STATUS_DRAFT,
self::STATUS_SCHEDULED,
self::STATUS_SENDING,
@@ -349,10 +349,10 @@ class Newsletter extends Model {
$types_with_activation = [self::TYPE_NOTIFICATION, self::TYPE_WELCOME, self::TYPE_AUTOMATIC];
- if(($status === self::STATUS_DRAFT) && in_array($this->type, $types_with_activation)) {
+ if (($status === self::STATUS_DRAFT) && in_array($this->type, $types_with_activation)) {
ScheduledTask::pauseAllByNewsletter($this);
}
- if(($status === self::STATUS_ACTIVE) && in_array($this->type, $types_with_activation)) {
+ if (($status === self::STATUS_ACTIVE) && in_array($this->type, $types_with_activation)) {
ScheduledTask::setScheduledAllByNewsletter($this);
}
return $this;
@@ -386,11 +386,11 @@ class Newsletter extends Model {
$duplicate->save();
- if($duplicate->getErrors() === false) {
+ if ($duplicate->getErrors() === false) {
// create relationships between duplicate and segments
$segments = $this->segments()->findMany();
- if(!empty($segments)) {
+ if (!empty($segments)) {
foreach ($segments as $segment) {
$relation = NewsletterSegment::create();
$relation->segment_id = $segment->id;
@@ -403,7 +403,7 @@ class Newsletter extends Model {
$options = NewsletterOption::where('newsletter_id', $this->id)
->findMany();
- if(!empty($options)) {
+ if (!empty($options)) {
foreach ($options as $option) {
$relation = NewsletterOption::create();
$relation->newsletter_id = $duplicate->id;
@@ -445,11 +445,11 @@ class Newsletter extends Model {
$notification_history->save();
- if($notification_history->getErrors() === false) {
+ if ($notification_history->getErrors() === false) {
// create relationships between notification history and segments
$segments = $this->segments()->findMany();
- if(!empty($segments)) {
+ if (!empty($segments)) {
foreach ($segments as $segment) {
$relation = NewsletterSegment::create();
$relation->segment_id = $segment->id;
@@ -465,7 +465,7 @@ class Newsletter extends Model {
function asArray() {
$model = parent::asArray();
- if(isset($model['body'])) {
+ if (isset($model['body'])) {
$model['body'] = json_decode($model['body'], true);
}
return $model;
@@ -473,14 +473,14 @@ class Newsletter extends Model {
function withSegments($incl_deleted = false) {
$this->segments = $this->segments()->findArray();
- if($incl_deleted) {
+ if ($incl_deleted) {
$this->withDeletedSegments();
}
return $this;
}
function withDeletedSegments() {
- if(!empty($this->segments)) {
+ if (!empty($this->segments)) {
$segment_ids = array_column($this->segments, 'id');
$links = $this->segmentRelations()
->whereNotIn('segment_id', $segment_ids)->findArray();
@@ -509,7 +509,7 @@ class Newsletter extends Model {
function withSendingQueue() {
$queue = $this->getQueue();
- if($queue === false) {
+ if ($queue === false) {
$this->queue = false;
} else {
$this->queue = $queue->asArray();
@@ -519,7 +519,7 @@ class Newsletter extends Model {
function withOptions() {
$options = $this->options()->findArray();
- if(empty($options)) {
+ if (empty($options)) {
$this->options = array();
} else {
$this->options = array_column($options, 'value', 'name');
@@ -554,7 +554,7 @@ class Newsletter extends Model {
}
function getStatistics() {
- if(($this->type !== self::TYPE_WELCOME) && ($this->queue === false)) {
+ if (($this->type !== self::TYPE_WELCOME) && ($this->queue === false)) {
return false;
}
@@ -566,7 +566,7 @@ class Newsletter extends Model {
$result = array();
foreach ($statisticsExprs as $name => $statisticsExpr) {
- if(!in_array($this->type, array(self::TYPE_WELCOME, self::TYPE_AUTOMATIC))) {
+ if (!in_array($this->type, array(self::TYPE_WELCOME, self::TYPE_AUTOMATIC))) {
$row = $statisticsExpr->whereRaw('`queue_id` = ?', array($this->queue['id']))->findOne();
} else {
$row = $statisticsExpr
@@ -640,7 +640,7 @@ class Newsletter extends Model {
}
static function search($orm, $search = '') {
- if(strlen(trim($search)) > 0) {
+ if (strlen(trim($search)) > 0) {
$orm->whereLike('subject', '%' . $search . '%');
}
return $orm;
@@ -651,7 +651,7 @@ class Newsletter extends Model {
$group = (isset($data['params']['group'])) ? $data['params']['group'] : null;
// newsletter types without filters
- if(in_array($type, array(
+ if (in_array($type, array(
self::TYPE_NOTIFICATION_HISTORY
))) {
return false;
@@ -671,7 +671,7 @@ class Newsletter extends Model {
$newsletters_count = $newsletters->count();
- if($newsletters_count > 0) {
+ if ($newsletters_count > 0) {
$segment_list[] = array(
'label' => sprintf('%s (%d)', $segment->name, $newsletters_count),
'value' => $segment->id
@@ -688,11 +688,11 @@ class Newsletter extends Model {
static function filterBy($orm, $data = array()) {
// apply filters
- if(!empty($data['filter'])) {
+ if (!empty($data['filter'])) {
foreach ($data['filter'] as $key => $value) {
- if($key === 'segment') {
+ if ($key === 'segment') {
$segment = Segment::findOne($value);
- if($segment !== false) {
+ if ($segment !== false) {
$orm = $segment->newsletters();
}
}
@@ -701,7 +701,7 @@ class Newsletter extends Model {
// filter by type
$type = isset($data['params']['type']) ? $data['params']['type'] : null;
- if($type !== null) {
+ if ($type !== null) {
$group = (isset($data['params']['group'])) ? $data['params']['group'] : null;
$orm->filter('filterType', $type, $group);
}
@@ -710,7 +710,7 @@ class Newsletter extends Model {
$parent_id = isset($data['params']['parent_id'])
? (int)$data['params']['parent_id']
: null;
- if($parent_id !== null) {
+ if ($parent_id !== null) {
$orm->where('parent_id', $parent_id);
}
@@ -721,7 +721,7 @@ class Newsletter extends Model {
$orm = $orm->select(MP_NEWSLETTERS_TABLE.'.*');
$optionFields = NewsletterOptionField::findArray();
foreach ($optionFields as $optionField) {
- if($optionField['newsletter_type'] !== $type) {
+ if ($optionField['newsletter_type'] !== $type) {
continue;
}
$orm = $orm->select_expr(
@@ -755,7 +755,7 @@ class Newsletter extends Model {
$group = (isset($data['params']['group'])) ? $data['params']['group'] : null;
// newsletter types without groups
- if(in_array($type, array(
+ if (in_array($type, array(
self::TYPE_NOTIFICATION_HISTORY
))) {
return false;
@@ -869,7 +869,7 @@ class Newsletter extends Model {
}
static function filterStatus($orm, $status = false) {
- if(in_array($status, array(
+ if (in_array($status, array(
self::STATUS_DRAFT,
self::STATUS_SCHEDULED,
self::STATUS_SENDING,
@@ -882,14 +882,14 @@ class Newsletter extends Model {
}
static function filterType($orm, $type = false, $group = false) {
- if(in_array($type, array(
+ if (in_array($type, array(
self::TYPE_STANDARD,
self::TYPE_WELCOME,
self::TYPE_AUTOMATIC,
self::TYPE_NOTIFICATION,
self::TYPE_NOTIFICATION_HISTORY
))) {
- if($type === self::TYPE_AUTOMATIC && $group) {
+ if ($type === self::TYPE_AUTOMATIC && $group) {
$orm = $orm->join(
NewsletterOptionField::$_table,
array(
@@ -925,7 +925,7 @@ class Newsletter extends Model {
self::$_table . '.deleted_at'
)
);
- if($data['sort_by'] === 'sent_at') {
+ if ($data['sort_by'] === 'sent_at') {
$query = $query->orderByExpr('ISNULL(sent_at) DESC');
}
return $query
@@ -938,7 +938,7 @@ class Newsletter extends Model {
return parent::_createOrUpdate($data, false, function($data) {
$settings = new SettingsController();
// set default sender based on settings
- if(empty($data['sender'])) {
+ if (empty($data['sender'])) {
$sender = $settings->get('sender', []);
$data['sender_name'] = (
!empty($sender['name'])
@@ -953,7 +953,7 @@ class Newsletter extends Model {
}
// set default reply_to based on settings
- if(empty($data['reply_to'])) {
+ if (empty($data['reply_to'])) {
$reply_to = $settings->get('reply_to', array());
$data['reply_to_name'] = (
!empty($reply_to['name'])
@@ -1015,7 +1015,7 @@ class Newsletter extends Model {
->select('tasks.processed_at')
->orderByDesc('tasks.processed_at');
- if(!empty($segment_ids)) {
+ if (!empty($segment_ids)) {
$orm->join(
MP_NEWSLETTER_SEGMENT_TABLE,
'newsletter_segments.newsletter_id = newsletters.id',
@@ -1032,14 +1032,14 @@ class Newsletter extends Model {
}
function getMeta() {
- if(!$this->meta) return;
+ if (!$this->meta) return;
return (Helpers::isJson($this->meta)) ? json_decode($this->meta, true) : $this->meta;
}
static function findOneWithOptions($id) {
$newsletter = self::findOne($id);
- if($newsletter === false) {
+ if ($newsletter === false) {
return false;
}
return self::filter('filterWithOptions', $newsletter->type)->findOne($id);
diff --git a/lib/Models/NewsletterLink.php b/lib/Models/NewsletterLink.php
index b29f2f2586..867ae74557 100644
--- a/lib/Models/NewsletterLink.php
+++ b/lib/Models/NewsletterLink.php
@@ -1,7 +1,7 @@
orderByDesc('clicksCount')
->limit(1)
->findOne();
- if(!$link) {
+ if (!$link) {
return null;
}
return $link;
diff --git a/lib/Models/NewsletterOption.php b/lib/Models/NewsletterOption.php
index 8dcb63391a..9eb8cee3be 100644
--- a/lib/Models/NewsletterOption.php
+++ b/lib/Models/NewsletterOption.php
@@ -1,13 +1,13 @@
select('id')
->orderByDesc('id')
@@ -38,7 +38,7 @@ class NewsletterTemplate extends Model {
function asArray() {
$template = parent::asArray();
- if(isset($template['body'])) {
+ if (isset($template['body'])) {
$template['body'] = json_decode($template['body'], true);
}
return $template;
diff --git a/lib/Models/ScheduledTask.php b/lib/Models/ScheduledTask.php
index f5d7ab5f55..38324bf467 100644
--- a/lib/Models/ScheduledTask.php
+++ b/lib/Models/ScheduledTask.php
@@ -4,7 +4,7 @@ namespace MailPoet\Models;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
/**
* @property int $id
@@ -90,7 +90,7 @@ class ScheduledTask extends Model {
function save() {
// set the default priority to medium
- if(!$this->priority) {
+ if (!$this->priority) {
$this->priority = self::PRIORITY_MEDIUM;
}
parent::save();
diff --git a/lib/Models/ScheduledTaskSubscriber.php b/lib/Models/ScheduledTaskSubscriber.php
index b8bb544736..5f9b02404b 100644
--- a/lib/Models/ScheduledTaskSubscriber.php
+++ b/lib/Models/ScheduledTaskSubscriber.php
@@ -1,7 +1,7 @@
where('processed', $processed);
}
return $orm->count();
diff --git a/lib/Models/Segment.php b/lib/Models/Segment.php
index 4331352843..2c3ef33b82 100644
--- a/lib/Models/Segment.php
+++ b/lib/Models/Segment.php
@@ -1,7 +1,7 @@
subscribers()->findResultSet() as $relation) {
$new_relation = SubscriberSegment::create();
$new_relation->set('subscriber_id', $relation->id);
@@ -112,7 +112,7 @@ class Segment extends Model {
static function getWPSegment() {
$wp_segment = self::where('type', self::TYPE_WP_USERS)->findOne();
- if($wp_segment === false) {
+ if ($wp_segment === false) {
// create the wp users segment
$wp_segment = Segment::create();
$wp_segment->hydrate(array(
@@ -130,7 +130,7 @@ class Segment extends Model {
static function getWooCommerceSegment() {
$wc_segment = self::where('type', self::TYPE_WC_USERS)->findOne();
- if($wc_segment === false) {
+ if ($wc_segment === false) {
// create the WooCommerce customers segment
$wc_segment = Segment::create();
$wc_segment->hydrate(array(
@@ -165,7 +165,7 @@ class Segment extends Model {
}
static function groupBy($orm, $group = null) {
- if($group === 'trash') {
+ if ($group === 'trash') {
$orm->whereNotNull('deleted_at');
} else {
$orm->whereNull('deleted_at');
@@ -197,7 +197,7 @@ class Segment extends Model {
->orderByAsc(self::$_table.'.name')
->whereNull(self::$_table.'.deleted_at');
- if(!empty($type)) {
+ if (!empty($type)) {
$query->where(self::$_table.'.type', $type);
}
@@ -234,7 +234,7 @@ class Segment extends Model {
static function listingQuery(array $data = array()) {
$query = self::select('*');
$query->whereIn('type', array(Segment::TYPE_DEFAULT, Segment::TYPE_WP_USERS, Segment::TYPE_WC_USERS));
- if(isset($data['group'])) {
+ if (isset($data['group'])) {
$query->filter('groupBy', $data['group']);
}
return $query;
diff --git a/lib/Models/SendingQueue.php b/lib/Models/SendingQueue.php
index 2e7dd7da13..05aa5d3cec 100644
--- a/lib/Models/SendingQueue.php
+++ b/lib/Models/SendingQueue.php
@@ -5,7 +5,7 @@ use MailPoet\Util\Helpers;
use MailPoet\WP\Emoji;
use MailPoet\Tasks\Subscribers as TaskSubscribers;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
/**
* @property int $count_processed
@@ -44,7 +44,7 @@ class SendingQueue extends Model {
}
function pause() {
- if($this->count_processed === $this->count_total) {
+ if ($this->count_processed === $this->count_total) {
return false;
} else {
return $this->task()->findOne()->pause();
@@ -52,7 +52,7 @@ class SendingQueue extends Model {
}
function resume() {
- if($this->count_processed === $this->count_total) {
+ if ($this->count_processed === $this->count_total) {
return $this->complete();
} else {
return $this->task()->findOne()->resume();
@@ -65,13 +65,13 @@ class SendingQueue extends Model {
function save() {
$this->newsletter_rendered_body = $this->getNewsletterRenderedBody();
- if(!Helpers::isJson($this->newsletter_rendered_body) && !is_null($this->newsletter_rendered_body)) {
+ if (!Helpers::isJson($this->newsletter_rendered_body) && !is_null($this->newsletter_rendered_body)) {
$this->set(
'newsletter_rendered_body',
json_encode($this->encodeEmojisInBody($this->newsletter_rendered_body))
);
}
- if(!Helpers::isJson($this->meta)) {
+ if (!Helpers::isJson($this->meta)) {
$this->set(
'meta',
json_encode($this->meta)
@@ -86,11 +86,11 @@ class SendingQueue extends Model {
* Used only for checking processed subscribers in old queues
*/
private function getSubscribers() {
- if(!is_serialized($this->subscribers)) {
+ if (!is_serialized($this->subscribers)) {
return $this->subscribers;
}
$subscribers = unserialize($this->subscribers);
- if(empty($subscribers['processed'])) {
+ if (empty($subscribers['processed'])) {
$subscribers['processed'] = array();
}
return $subscribers;
@@ -108,7 +108,7 @@ class SendingQueue extends Model {
}
function encodeEmojisInBody($newsletter_rendered_body) {
- if(is_array($newsletter_rendered_body)) {
+ if (is_array($newsletter_rendered_body)) {
foreach ($newsletter_rendered_body as $key => $value) {
$newsletter_rendered_body[$key] = $this->emoji->encodeForUTF8Column(
self::$_table,
@@ -121,7 +121,7 @@ class SendingQueue extends Model {
}
function decodeEmojisInBody($newsletter_rendered_body) {
- if(is_array($newsletter_rendered_body)) {
+ if (is_array($newsletter_rendered_body)) {
foreach ($newsletter_rendered_body as $key => $value) {
$newsletter_rendered_body[$key] = $this->emoji->decodeEntities($value);
}
@@ -130,13 +130,13 @@ class SendingQueue extends Model {
}
function isSubscriberProcessed($subscriber_id) {
- if(!empty($this->subscribers)
+ if (!empty($this->subscribers)
&& ScheduledTaskSubscriber::getTotalCount($this->task_id) === 0
) {
$subscribers = $this->getSubscribers();
return in_array($subscriber_id, $subscribers['processed']);
} else {
- if($task = $this->task()->findOne()) {
+ if ($task = $this->task()->findOne()) {
$task_subscribers = new TaskSubscribers($task);
return $task_subscribers->isSubscriberProcessed($subscriber_id);
}
@@ -152,10 +152,10 @@ class SendingQueue extends Model {
}
private function decodeRenderedNewsletterBodyObject($rendered_body) {
- if(is_serialized($rendered_body)) {
+ if (is_serialized($rendered_body)) {
return $this->decodeEmojisInBody(unserialize($rendered_body));
}
- if(Helpers::isJson($rendered_body)) {
+ if (Helpers::isJson($rendered_body)) {
return $this->decodeEmojisInBody(json_decode($rendered_body, true));
}
return $rendered_body;
diff --git a/lib/Models/Setting.php b/lib/Models/Setting.php
index a969893581..036e6a986c 100644
--- a/lib/Models/Setting.php
+++ b/lib/Models/Setting.php
@@ -3,7 +3,7 @@ namespace MailPoet\Models;
use MailPoet\Settings\SettingsController;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Setting extends Model {
public static $_table = MP_SETTINGS_TABLE;
@@ -33,7 +33,7 @@ class Setting extends Model {
public static function getAll() {
$settingsCollection = self::findMany();
$settings = array();
- if(!empty($settingsCollection)) {
+ if (!empty($settingsCollection)) {
foreach ($settingsCollection as $setting) {
$value = (is_serialized($setting->value)
? unserialize($setting->value)
@@ -57,7 +57,7 @@ class Setting extends Model {
public static function saveDefaultSenderIfNeeded($sender_address, $sender_name) {
$settings = new SettingsController();
- if(empty($sender_address) || empty($sender_name) || $settings->get('sender')) {
+ if (empty($sender_address) || empty($sender_name) || $settings->get('sender')) {
return;
}
$settings->set('sender', array(
diff --git a/lib/Models/StatisticsClicks.php b/lib/Models/StatisticsClicks.php
index 8e874d7d23..389b2d3013 100644
--- a/lib/Models/StatisticsClicks.php
+++ b/lib/Models/StatisticsClicks.php
@@ -1,7 +1,7 @@
where('newsletter_id', $newsletter_id)
->where('queue_id', $queue_id)
->findOne();
- if(!$statistics) {
+ if (!$statistics) {
$statistics = self::create();
$statistics->link_id = $link_id;
$statistics->subscriber_id = $subscriber_id;
diff --git a/lib/Models/StatisticsForms.php b/lib/Models/StatisticsForms.php
index d9c3560e2d..45912a50f0 100644
--- a/lib/Models/StatisticsForms.php
+++ b/lib/Models/StatisticsForms.php
@@ -1,7 +1,7 @@
0 && $subscriber_id > 0) {
+ if ($form_id > 0 && $subscriber_id > 0) {
// check if we already have a record for today
$record = self::where('form_id', $form_id)
->where('subscriber_id', $subscriber_id)
->findOne();
- if($record === false) {
+ if ($record === false) {
// create a new entry
$record = self::create();
$record->hydrate(array(
diff --git a/lib/Models/StatisticsNewsletters.php b/lib/Models/StatisticsNewsletters.php
index ed6af8ae28..f6ae38b578 100644
--- a/lib/Models/StatisticsNewsletters.php
+++ b/lib/Models/StatisticsNewsletters.php
@@ -1,7 +1,7 @@
where('newsletter_id', $newsletter_id)
->where('queue_id', $queue_id)
->findOne();
- if(!$statistics) {
+ if (!$statistics) {
$statistics = self::create();
$statistics->subscriber_id = $subscriber_id;
$statistics->newsletter_id = $newsletter_id;
diff --git a/lib/Models/StatisticsUnsubscribes.php b/lib/Models/StatisticsUnsubscribes.php
index 5acabdf064..d319c6058d 100644
--- a/lib/Models/StatisticsUnsubscribes.php
+++ b/lib/Models/StatisticsUnsubscribes.php
@@ -1,7 +1,7 @@
where('newsletter_id', $newsletter_id)
->where('queue_id', $queue_id)
->findOne();
- if(!$statistics) {
+ if (!$statistics) {
$statistics = self::create();
$statistics->subscriber_id = $subscriber_id;
$statistics->newsletter_id = $newsletter_id;
diff --git a/lib/Models/StatsNotification.php b/lib/Models/StatsNotification.php
index b02cb2720a..d43dec4b25 100644
--- a/lib/Models/StatsNotification.php
+++ b/lib/Models/StatsNotification.php
@@ -18,17 +18,17 @@ class StatsNotification extends Model {
static function createOrUpdate($data = array()) {
$model = null;
- if(isset($data['id']) && (int)$data['id'] > 0) {
+ if (isset($data['id']) && (int)$data['id'] > 0) {
$model = static::findOne((int)$data['id']);
}
- if(!$model && isset($data['task_id']) && $data['newsletter_id']) {
+ if (!$model && isset($data['task_id']) && $data['newsletter_id']) {
$model = self::where('newsletter_id', $data['newsletter_id'])
->where('task_id', $data['task_id'])
->findOne();
}
- if(!$model) {
+ if (!$model) {
$model = static::create();
$model->hydrate($data);
} else {
diff --git a/lib/Models/Subscriber.php b/lib/Models/Subscriber.php
index dea8eb61e4..0539866dda 100644
--- a/lib/Models/Subscriber.php
+++ b/lib/Models/Subscriber.php
@@ -9,7 +9,7 @@ use MailPoet\Subscribers\Source;
use MailPoet\Util\Helpers;
use function MailPoet\Util\array_column;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
/**
* @property int $id
@@ -39,7 +39,7 @@ class Subscriber extends Model {
}
static function findOne($id = false) {
- if(is_int($id) || (string)(int)$id === $id) {
+ if (is_int($id) || (string)(int)$id === $id) {
return parent::findOne($id);
} else if (strlen(trim($id)) > 0) {
return parent::where('email', $id)->findOne();
@@ -65,7 +65,7 @@ class Subscriber extends Model {
function delete() {
// WP Users cannot be deleted
- if($this->isWPUser() || $this->isWooCommerceUser()) {
+ if ($this->isWPUser() || $this->isWooCommerceUser()) {
return false;
} else {
// delete all relations to segments
@@ -78,7 +78,7 @@ class Subscriber extends Model {
function trash() {
// WP Users cannot be trashed
- if($this->isWPUser() || $this->isWooCommerceUser()) {
+ if ($this->isWPUser() || $this->isWooCommerceUser()) {
return false;
} else {
return parent::trash();
@@ -99,9 +99,9 @@ class Subscriber extends Model {
}
static function generateToken($email = null) {
- if($email !== null) {
+ if ($email !== null) {
$auth_key = '';
- if(defined('AUTH_KEY')) {
+ if (defined('AUTH_KEY')) {
$auth_key = AUTH_KEY;
}
return substr(md5($auth_key . $email), 0, self::SUBSCRIBER_TOKEN_LENGTH);
@@ -131,10 +131,10 @@ class Subscriber extends Model {
$subscriber = self::findOne($subscriber_data['email']);
- if($subscriber === false || !$signup_confirmation_enabled) {
+ if ($subscriber === false || !$signup_confirmation_enabled) {
// create new subscriber or update if no confirmation is required
$subscriber = self::createOrUpdate($subscriber_data);
- if($subscriber->getErrors() !== false) {
+ if ($subscriber->getErrors() !== false) {
$subscriber = Source::setSource($subscriber, Source::FORM);
$subscriber->save();
return $subscriber;
@@ -148,13 +148,13 @@ class Subscriber extends Model {
}
// restore trashed subscriber
- if($subscriber->deleted_at !== null) {
+ if ($subscriber->deleted_at !== null) {
$subscriber->setExpr('deleted_at', 'NULL');
}
// set status depending on signup confirmation setting
- if($subscriber->status !== self::STATUS_SUBSCRIBED) {
- if($signup_confirmation_enabled === true) {
+ if ($subscriber->status !== self::STATUS_SUBSCRIBED) {
+ if ($signup_confirmation_enabled === true) {
$subscriber->set('status', self::STATUS_UNCONFIRMED);
} else {
$subscriber->set('status', self::STATUS_SUBSCRIBED);
@@ -163,14 +163,14 @@ class Subscriber extends Model {
$subscriber = Source::setSource($subscriber, Source::FORM);
- if($subscriber->save()) {
+ if ($subscriber->save()) {
// link subscriber to segments
SubscriberSegment::subscribeToSegments($subscriber, $segment_ids);
$sender = new ConfirmationEmailMailer();
$sender->sendConfirmationEmail($subscriber);
- if($subscriber->status === self::STATUS_SUBSCRIBED) {
+ if ($subscriber->status === self::STATUS_SUBSCRIBED) {
$sender = new NewSubscriberNotificationMailer();
$sender->send($subscriber, Segment::whereIn('id', $segment_ids)->findMany());
@@ -206,7 +206,7 @@ class Subscriber extends Model {
}
static function search($orm, $search = '') {
- if(strlen(trim($search) === 0)) {
+ if (strlen(trim($search) === 0)) {
return $orm;
}
@@ -267,16 +267,16 @@ class Subscriber extends Model {
}
static function filterBy($orm, $filters = null) {
- if(empty($filters)) {
+ if (empty($filters)) {
return $orm;
}
foreach ($filters as $key => $value) {
- if($key === 'segment') {
- if($value === 'none') {
+ if ($key === 'segment') {
+ if ($value === 'none') {
return self::filter('withoutSegments');
} else {
$segment = Segment::findOne($value);
- if($segment !== false) {
+ if ($segment !== false) {
return $segment->subscribers();
}
}
@@ -321,7 +321,7 @@ class Subscriber extends Model {
}
static function groupBy($orm, $group = null) {
- if($group === 'trash') {
+ if ($group === 'trash') {
return $orm->whereNotNull('deleted_at');
} else if ($group === 'all') {
return $orm->whereNull('deleted_at');
@@ -415,31 +415,31 @@ class Subscriber extends Model {
static function createOrUpdate($data = array()) {
$subscriber = false;
- if(is_array($data) && !empty($data)) {
+ if (is_array($data) && !empty($data)) {
$data = stripslashes_deep($data);
}
- if(isset($data['id']) && (int)$data['id'] > 0) {
+ if (isset($data['id']) && (int)$data['id'] > 0) {
$subscriber = self::findOne((int)$data['id']);
unset($data['id']);
}
- if($subscriber === false && !empty($data['email'])) {
+ if ($subscriber === false && !empty($data['email'])) {
$subscriber = self::where('email', $data['email'])->findOne();
- if($subscriber !== false) {
+ if ($subscriber !== false) {
unset($data['email']);
}
}
// segments
$segment_ids = false;
- if(array_key_exists('segments', $data)) {
+ if (array_key_exists('segments', $data)) {
$segment_ids = (array)$data['segments'];
unset($data['segments']);
}
// if new subscriber, make sure that required fields are set
- if(!$subscriber) {
+ if (!$subscriber) {
$data = self::setRequiredFieldsDefaultValues($data);
}
@@ -452,7 +452,7 @@ class Subscriber extends Model {
$old_status = false;
$new_status = false;
- if($subscriber === false) {
+ if ($subscriber === false) {
$subscriber = self::create();
$subscriber->hydrate($data);
} else {
@@ -461,13 +461,13 @@ class Subscriber extends Model {
$new_status = $subscriber->status;
}
- if($subscriber->save()) {
- if(!empty($custom_fields)) {
+ if ($subscriber->save()) {
+ if (!empty($custom_fields)) {
$subscriber->saveCustomFields($custom_fields);
}
// check for status change
- if(
+ if (
($old_status === self::STATUS_SUBSCRIBED)
&&
($new_status === self::STATUS_UNSUBSCRIBED)
@@ -475,7 +475,7 @@ class Subscriber extends Model {
// make sure we unsubscribe the user from all segments
SubscriberSegment::unsubscribeFromSegments($subscriber);
} else {
- if($segment_ids !== false) {
+ if ($segment_ids !== false) {
SubscriberSegment::resetSubscriptions($subscriber, $segment_ids);
}
}
@@ -485,7 +485,7 @@ class Subscriber extends Model {
function withCustomFields() {
$custom_fields = CustomField::select('id')->findArray();
- if(empty($custom_fields)) return $this;
+ if (empty($custom_fields)) return $this;
$custom_field_ids = array_column($custom_fields, 'id');
$relations = SubscriberCustomField::select('custom_field_id')
@@ -517,7 +517,7 @@ class Subscriber extends Model {
->where('subscriber_id', $this->id())
->findOne();
- if($custom_field === false) {
+ if ($custom_field === false) {
return $default;
} else {
return $custom_field->value;
@@ -557,7 +557,7 @@ class Subscriber extends Model {
}
function getUnconfirmedData() {
- if(!empty($this->unconfirmed_data)) {
+ if (!empty($this->unconfirmed_data)) {
$subscriber_data = json_decode($this->unconfirmed_data, true);
$subscriber_data = self::filterOutReservedColumns((array)$subscriber_data);
return $subscriber_data;
@@ -569,7 +569,7 @@ class Subscriber extends Model {
$segment_id = (isset($data['segment_id']) ? (int)$data['segment_id'] : 0);
$segment = Segment::findOne($segment_id);
- if($segment === false) return false;
+ if ($segment === false) return false;
$count = parent::bulkAction($orm,
function($subscriber_ids) use($segment) {
@@ -589,7 +589,7 @@ class Subscriber extends Model {
$segment_id = (isset($data['segment_id']) ? (int)$data['segment_id'] : 0);
$segment = Segment::findOne($segment_id);
- if($segment === false) return false;
+ if ($segment === false) return false;
$count = parent::bulkAction($orm,
function($subscriber_ids) use($segment) {
@@ -610,7 +610,7 @@ class Subscriber extends Model {
$segment_id = (isset($data['segment_id']) ? (int)$data['segment_id'] : 0);
$segment = Segment::findOne($segment_id);
- if($segment === false) return false;
+ if ($segment === false) return false;
$count = $orm->count();
@@ -644,10 +644,10 @@ class Subscriber extends Model {
->findMany();
$emails_sent = 0;
- if(!empty($subscribers)) {
+ if (!empty($subscribers)) {
$sender = new ConfirmationEmailMailer();
foreach ($subscribers as $subscriber) {
- if($sender->sendConfirmationEmail($subscriber)) {
+ if ($sender->sendConfirmationEmail($subscriber)) {
$emails_sent++;
}
}
@@ -762,7 +762,7 @@ class Subscriber extends Model {
'status'
);
// check if there is anything to update after excluding ignored columns
- if(!array_diff($columns, $ignore_columns_on_update)) return;
+ if (!array_diff($columns, $ignore_columns_on_update)) return;
$subscribers = array_map('array_values', $subscribers);
$email_position = array_search('email', $columns);
$sql =
@@ -779,7 +779,7 @@ class Subscriber extends Model {
$email_position,
$ignore_columns_on_update
) {
- if(in_array($column_name, $ignore_columns_on_update)) return;
+ if (in_array($column_name, $ignore_columns_on_update)) return;
$query = array_map(
function($subscriber) use ($type, $column_position, $email_position) {
return ($type === 'values') ?
@@ -831,7 +831,7 @@ class Subscriber extends Model {
'status' => (!$settings->get('signup_confirmation.enabled')) ? self::STATUS_SUBSCRIBED : self::STATUS_UNCONFIRMED
);
foreach ($required_field_default_values as $field => $value) {
- if(!isset($data[$field])) {
+ if (!isset($data[$field])) {
$data[$field] = $value;
}
}
@@ -841,7 +841,7 @@ class Subscriber extends Model {
static function extractCustomFieldsFromFromObject($data) {
$custom_fields = array();
foreach ($data as $key => $value) {
- if(strpos($key, 'cf_') === 0) {
+ if (strpos($key, 'cf_') === 0) {
$custom_fields[(int)substr($key, 3)] = $value;
unset($data[$key]);
}
diff --git a/lib/Models/SubscriberCustomField.php b/lib/Models/SubscriberCustomField.php
index 8923068ea8..9cf260181a 100644
--- a/lib/Models/SubscriberCustomField.php
+++ b/lib/Models/SubscriberCustomField.php
@@ -3,21 +3,21 @@ namespace MailPoet\Models;
use MailPoet\Util\Helpers;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class SubscriberCustomField extends Model {
public static $_table = MP_SUBSCRIBER_CUSTOM_FIELD_TABLE;
static function createOrUpdate($data = array()) {
$custom_field = CustomField::findOne($data['custom_field_id']);
- if($custom_field === false) {
+ if ($custom_field === false) {
return false;
} else {
$custom_field = $custom_field->asArray();
}
- if($custom_field['type'] === 'date') {
- if(is_array($data['value'])) {
+ if ($custom_field['type'] === 'date') {
+ if (is_array($data['value'])) {
$day = (
isset($data['value']['day'])
? (int)$data['value']['day']
@@ -72,14 +72,14 @@ class SubscriberCustomField extends Model {
}
static function deleteSubscriberRelations($subscriber) {
- if($subscriber === false) return false;
+ if ($subscriber === false) return false;
$relations = self::where('subscriber_id', $subscriber->id);
return $relations->deleteMany();
}
static function deleteManySubscriberRelations(array $subscriber_ids) {
- if(empty($subscriber_ids)) return false;
+ if (empty($subscriber_ids)) return false;
$relations = self::whereIn('subscriber_id', $subscriber_ids);
return $relations->deleteMany();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Models/SubscriberIP.php b/lib/Models/SubscriberIP.php
index 0d1505af20..9660fcde83 100644
--- a/lib/Models/SubscriberIP.php
+++ b/lib/Models/SubscriberIP.php
@@ -1,7 +1,7 @@
count_confirmations = 0;
@@ -21,18 +21,18 @@ class SubscriberSegment extends Model {
$wp_segment = Segment::getWPSegment();
$wc_segment = Segment::getWooCommerceSegment();
- if(!empty($segment_ids)) {
+ if (!empty($segment_ids)) {
// unsubscribe from segments
foreach ($segment_ids as $segment_id) {
// do not remove subscriptions to the WP Users or WooCommerce Customers segments
- if(($wp_segment !== false && (int)$wp_segment->id === (int)$segment_id)
+ if (($wp_segment !== false && (int)$wp_segment->id === (int)$segment_id)
|| ($wc_segment !== false && (int)$wc_segment->id === (int)$segment_id)
) {
continue;
}
- if((int)$segment_id > 0) {
+ if ((int)$segment_id > 0) {
self::createOrUpdate(array(
'subscriber_id' => $subscriber->id,
'segment_id' => $segment_id,
@@ -44,12 +44,12 @@ class SubscriberSegment extends Model {
// unsubscribe from all segments (except the WP users and WooCommerce customers segments)
$subscriptions = self::where('subscriber_id', $subscriber->id);
- if($wp_segment !== false) {
+ if ($wp_segment !== false) {
$subscriptions = $subscriptions->whereNotEqual(
'segment_id', $wp_segment->id
);
}
- if($wc_segment !== false) {
+ if ($wc_segment !== false) {
$subscriptions = $subscriptions->whereNotEqual(
'segment_id', $wc_segment->id
);
@@ -63,7 +63,7 @@ class SubscriberSegment extends Model {
}
static function resubscribeToAllSegments($subscriber) {
- if($subscriber === false) return false;
+ if ($subscriber === false) return false;
// (re)subscribe to all segments linked to the subscriber
return self::where('subscriber_id', $subscriber->id)
->findResultSet()
@@ -72,11 +72,11 @@ class SubscriberSegment extends Model {
}
static function subscribeToSegments($subscriber, $segment_ids = array()) {
- if($subscriber === false) return false;
- if(!empty($segment_ids)) {
+ if ($subscriber === false) return false;
+ if (!empty($segment_ids)) {
// subscribe to specified segments
foreach ($segment_ids as $segment_id) {
- if((int)$segment_id > 0) {
+ if ((int)$segment_id > 0) {
self::createOrUpdate(array(
'subscriber_id' => $subscriber->id,
'segment_id' => $segment_id,
@@ -97,7 +97,7 @@ class SubscriberSegment extends Model {
$subscriber_ids = array(),
$segment_ids = array()
) {
- if(empty($subscriber_ids) || empty($segment_ids)) {
+ if (empty($subscriber_ids) || empty($segment_ids)) {
return false;
}
@@ -123,7 +123,7 @@ class SubscriberSegment extends Model {
}
static function deleteManySubscriptions($subscriber_ids = array(), $segment_ids = array()) {
- if(empty($subscriber_ids)) return false;
+ if (empty($subscriber_ids)) return false;
// delete subscribers' relations to segments (except WP and WooCommerce segments)
$subscriptions = self::whereIn(
@@ -132,18 +132,18 @@ class SubscriberSegment extends Model {
$wp_segment = Segment::getWPSegment();
$wc_segment = Segment::getWooCommerceSegment();
- if($wp_segment !== false) {
+ if ($wp_segment !== false) {
$subscriptions = $subscriptions->whereNotEqual(
'segment_id', $wp_segment->id
);
}
- if($wc_segment !== false) {
+ if ($wc_segment !== false) {
$subscriptions = $subscriptions->whereNotEqual(
'segment_id', $wc_segment->id
);
}
- if(!empty($segment_ids)) {
+ if (!empty($segment_ids)) {
$subscriptions = $subscriptions->whereIn('segment_id', $segment_ids);
}
@@ -151,7 +151,7 @@ class SubscriberSegment extends Model {
}
static function deleteSubscriptions($subscriber, $segment_ids = array()) {
- if($subscriber === false) return false;
+ if ($subscriber === false) return false;
$wp_segment = Segment::getWPSegment();
$wc_segment = Segment::getWooCommerceSegment();
@@ -159,7 +159,7 @@ class SubscriberSegment extends Model {
$subscriptions = self::where('subscriber_id', $subscriber->id)
->whereNotIn('segment_id', [$wp_segment->id, $wc_segment->id]);
- if(!empty($segment_ids)) {
+ if (!empty($segment_ids)) {
$subscriptions = $subscriptions->whereIn('segment_id', $segment_ids);
}
return $subscriptions->deleteMany();
@@ -171,7 +171,7 @@ class SubscriberSegment extends Model {
static function createOrUpdate($data = array()) {
$keys = false;
- if(isset($data['subscriber_id']) && isset($data['segment_id'])) {
+ if (isset($data['subscriber_id']) && isset($data['segment_id'])) {
$keys = array(
'subscriber_id' => (int)$data['subscriber_id'],
'segment_id' => (int)$data['segment_id']
diff --git a/lib/Newsletter/AutomatedLatestContent.php b/lib/Newsletter/AutomatedLatestContent.php
index fb083536d2..7fd8838bdb 100644
--- a/lib/Newsletter/AutomatedLatestContent.php
+++ b/lib/Newsletter/AutomatedLatestContent.php
@@ -4,7 +4,7 @@ namespace MailPoet\Newsletter;
use MailPoet\Logging\Logger;
use MailPoet\Newsletter\Editor\Transformer;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class AutomatedLatestContent {
const DEFAULT_POSTS_PER_PAGE = 10;
@@ -24,7 +24,7 @@ class AutomatedLatestContent {
$wherePostUnsent = 'ID NOT IN (' . $sentPostsQuery . ')';
- if(!empty($where)) $wherePostUnsent = ' AND ' . $wherePostUnsent;
+ if (!empty($where)) $wherePostUnsent = ' AND ' . $wherePostUnsent;
return $where . $wherePostUnsent;
}
@@ -44,17 +44,17 @@ class AutomatedLatestContent {
'orderby' => 'date',
'order' => ($args['sortBy'] === 'newest') ? 'DESC' : 'ASC',
);
- if(!empty($args['offset']) && (int)$args['offset'] > 0) {
+ if (!empty($args['offset']) && (int)$args['offset'] > 0) {
$parameters['offset'] = (int)$args['offset'];
}
- if(isset($args['search'])) {
+ if (isset($args['search'])) {
$parameters['s'] = $args['search'];
}
- if(isset($args['posts']) && is_array($args['posts'])) {
+ if (isset($args['posts']) && is_array($args['posts'])) {
$parameters['post__in'] = $args['posts'];
$parameters['posts_per_page'] = -1; // Get all posts with matching IDs
}
- if(!empty($posts_to_exclude)) {
+ if (!empty($posts_to_exclude)) {
$parameters['post__not_in'] = $posts_to_exclude;
}
$parameters['tax_query'] = $this->constructTaxonomiesQuery($args);
@@ -65,7 +65,7 @@ class AutomatedLatestContent {
// the query.
$parameters['suppress_filters'] = false;
- if($this->newer_than_timestamp) {
+ if ($this->newer_than_timestamp) {
$parameters['date_query'] = array(
array(
'column' => 'post_date',
@@ -94,29 +94,29 @@ class AutomatedLatestContent {
function constructTaxonomiesQuery($args) {
$taxonomies_query = array();
- if(isset($args['terms']) && is_array($args['terms'])) {
+ if (isset($args['terms']) && is_array($args['terms'])) {
$taxonomies = array();
// Categorize terms based on their taxonomies
foreach ($args['terms'] as $term) {
$taxonomy = $term['taxonomy'];
- if(!isset($taxonomies[$taxonomy])) {
+ if (!isset($taxonomies[$taxonomy])) {
$taxonomies[$taxonomy] = array();
}
$taxonomies[$taxonomy][] = $term['id'];
}
foreach ($taxonomies as $taxonomy => $terms) {
- if(!empty($terms)) {
+ if (!empty($terms)) {
$tax = array(
'taxonomy' => $taxonomy,
'field' => 'id',
'terms' => $terms,
);
- if($args['inclusionType'] === 'exclude') $tax['operator'] = 'NOT IN';
+ if ($args['inclusionType'] === 'exclude') $tax['operator'] = 'NOT IN';
$taxonomies_query[] = $tax;
}
}
- if(!empty($taxonomies_query)) {
+ if (!empty($taxonomies_query)) {
// With exclusion we want to use 'AND', because we want posts that
// don't have excluded tags/categories. But with inclusion we want to
// use 'OR', because we want posts that have any of the included
@@ -128,13 +128,13 @@ class AutomatedLatestContent {
}
private function _attachSentPostsFilter() {
- if($this->newsletter_id > 0) {
+ if ($this->newsletter_id > 0) {
add_action('posts_where', array($this, 'filterOutSentPosts'));
}
}
private function _detachSentPostsFilter() {
- if($this->newsletter_id > 0) {
+ if ($this->newsletter_id > 0) {
remove_action('posts_where', array($this, 'filterOutSentPosts'));
}
}
diff --git a/lib/Newsletter/Editor/MetaInformationManager.php b/lib/Newsletter/Editor/MetaInformationManager.php
index eb4bdb2bb2..211811665d 100644
--- a/lib/Newsletter/Editor/MetaInformationManager.php
+++ b/lib/Newsletter/Editor/MetaInformationManager.php
@@ -1,7 +1,7 @@
post_author,
$args['authorPrecededBy']
);
}
- if($args['showCategories'] === $position_field) {
+ if ($args['showCategories'] === $position_field) {
$text[] = self::getPostCategories(
$post->ID,
$post->post_type,
@@ -26,9 +26,9 @@ class MetaInformationManager {
);
}
- if(!empty($text)) {
+ if (!empty($text)) {
$text = '' . implode(' ', $text) . '
';
- if($position === 'above') $content = $text . $content;
+ if ($position === 'above') $content = $text . $content;
else if ($position === 'below') $content .= $text;
}
}
@@ -46,9 +46,9 @@ class MetaInformationManager {
array('category'),
array('fields' => 'names')
);
- if(!empty($categories)) {
+ if (!empty($categories)) {
// check if the user specified a label to be displayed before the author's name
- if(strlen($preceded_by) > 0) {
+ if (strlen($preceded_by) > 0) {
$content = stripslashes($preceded_by) . ' ';
} else {
$content = '';
@@ -64,7 +64,7 @@ class MetaInformationManager {
$author_name = get_the_author_meta('display_name', (int)$author_id);
$preceded_by = trim($preceded_by);
- if(strlen($preceded_by) > 0) {
+ if (strlen($preceded_by) > 0) {
$author_name = stripslashes($preceded_by) . ' ' . $author_name;
}
diff --git a/lib/Newsletter/Editor/PostContentManager.php b/lib/Newsletter/Editor/PostContentManager.php
index 354a588c0a..f6e9e2a9ac 100644
--- a/lib/Newsletter/Editor/PostContentManager.php
+++ b/lib/Newsletter/Editor/PostContentManager.php
@@ -4,7 +4,7 @@ namespace MailPoet\Newsletter\Editor;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class PostContentManager {
const WP_POST_CLASS = 'mailpoet_wp_post';
@@ -18,11 +18,11 @@ class PostContentManager {
}
function getContent($post, $displayType) {
- if($displayType === 'titleOnly') {
+ if ($displayType === 'titleOnly') {
return '';
} elseif ($displayType === 'excerpt') {
// get excerpt
- if(!empty($post->post_excerpt)) {
+ if (!empty($post->post_excerpt)) {
return self::stripShortCodes($post->post_excerpt);
} else {
return $this->generateExcerpt(self::stripShortCodes($post->post_content));
@@ -50,12 +50,12 @@ class PostContentManager {
'', '', '', '', '', '',
'', '', '', '', ' ', ''
);
- if($display_type === 'full') {
+ if ($display_type === 'full') {
$tags_not_being_stripped = array_merge($tags_not_being_stripped, array('', ' ', '', '', ''));
}
$content = strip_tags($content, implode('', $tags_not_being_stripped));
- if($with_post_class) {
+ if ($with_post_class) {
$content = str_replace(' ', $content);
- if(count($excerpts) > 1) {
+ if (count($excerpts) > 1) {
// separator was present
return $excerpts[0];
} else {
diff --git a/lib/Newsletter/Editor/PostListTransformer.php b/lib/Newsletter/Editor/PostListTransformer.php
index 21a7b9811f..97531cd254 100644
--- a/lib/Newsletter/Editor/PostListTransformer.php
+++ b/lib/Newsletter/Editor/PostListTransformer.php
@@ -3,7 +3,7 @@ namespace MailPoet\Newsletter\Editor;
use MailPoet\Newsletter\Editor\PostTransformer;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class PostListTransformer {
@@ -20,7 +20,7 @@ class PostListTransformer {
$use_divider = filter_var($this->args['showDivider'], FILTER_VALIDATE_BOOLEAN);
foreach ($posts as $index => $post) {
- if($use_divider && $index > 0) {
+ if ($use_divider && $index > 0) {
$results[] = $this->transformer->getDivider();
}
diff --git a/lib/Newsletter/Editor/PostTransformer.php b/lib/Newsletter/Editor/PostTransformer.php
index 945d23528e..6a6e3fc402 100644
--- a/lib/Newsletter/Editor/PostTransformer.php
+++ b/lib/Newsletter/Editor/PostTransformer.php
@@ -7,7 +7,7 @@ use MailPoet\Newsletter\Editor\StructureTransformer;
use MailPoet\Newsletter\Editor\LayoutHelper;
use MailPoet\WP\Functions as WPFunctions;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class PostTransformer {
@@ -24,7 +24,7 @@ class PostTransformer {
}
function getDivider() {
- if(empty($this->with_layout)) {
+ if (empty($this->with_layout)) {
return $this->args['divider'];
}
return LayoutHelper::row(array(
@@ -33,7 +33,7 @@ class PostTransformer {
}
function transform($post) {
- if(empty($this->with_layout)) {
+ if (empty($this->with_layout)) {
return $this->getStructure($post);
}
return $this->getStructureWithLayout($post);
@@ -45,18 +45,18 @@ class PostTransformer {
$featured_image = $this->getFeaturedImage($post);
$featured_image_position = $this->args['featuredImagePosition'];
- if($featured_image && $featured_image_position === 'belowTitle' && $this->args['displayType'] === 'excerpt') {
+ if ($featured_image && $featured_image_position === 'belowTitle' && $this->args['displayType'] === 'excerpt') {
array_unshift($content, $title, $featured_image);
return $content;
}
- if($content[0]['type'] === 'text') {
+ if ($content[0]['type'] === 'text') {
$content[0]['text'] = $title['text'] . $content[0]['text'];
} else {
array_unshift($content, $title);
}
- if($featured_image && $this->args['displayType'] === 'excerpt') {
+ if ($featured_image && $this->args['displayType'] === 'excerpt') {
array_unshift($content, $featured_image);
}
@@ -71,7 +71,7 @@ class PostTransformer {
$featured_image_position = $this->args['featuredImagePosition'];
- if(!$featured_image || $featured_image_position === 'none' || $this->args['displayType'] !== 'excerpt') {
+ if (!$featured_image || $featured_image_position === 'none' || $this->args['displayType'] !== 'excerpt') {
array_unshift($content, $title);
return array(
@@ -81,11 +81,11 @@ class PostTransformer {
);
}
- if($featured_image_position === 'aboveTitle' || $featured_image_position === 'belowTitle') {
+ if ($featured_image_position === 'aboveTitle' || $featured_image_position === 'belowTitle') {
$featured_image_position = 'centered';
}
- if($featured_image_position === 'centered') {
+ if ($featured_image_position === 'centered') {
array_unshift($content, $title, $featured_image);
return array(
LayoutHelper::row(array(
@@ -94,7 +94,7 @@ class PostTransformer {
);
}
- if($featured_image_position === 'alternate') {
+ if ($featured_image_position === 'alternate') {
$featured_image_position = $this->nextImagePosition();
}
@@ -134,7 +134,7 @@ class PostTransformer {
$read_more_btn = $this->getReadMoreButton($post);
$blocks_count = count($content);
- if($read_more_btn['type'] === 'text' && $blocks_count > 0 && $content[$blocks_count - 1]['type'] === 'text') {
+ if ($read_more_btn['type'] === 'text' && $blocks_count > 0 && $content[$blocks_count - 1]['type'] === 'text') {
$content[$blocks_count - 1]['text'] .= $read_more_btn['text'];
} else {
$content[] = $read_more_btn;
@@ -147,7 +147,7 @@ class PostTransformer {
$post_title = $post->post_title;
$image_full_width = (bool)filter_var($this->args['imageFullWidth'], FILTER_VALIDATE_BOOLEAN);
- if(!has_post_thumbnail($post_id)) {
+ if (!has_post_thumbnail($post_id)) {
return false;
}
@@ -160,7 +160,7 @@ class PostTransformer {
'_wp_attachment_image_alt',
true
)));
- if(strlen($alt_text) === 0) {
+ if (strlen($alt_text) === 0) {
// if the alt text is empty then use the post title
$alt_text = trim(strip_tags($post_title));
}
@@ -182,7 +182,7 @@ class PostTransformer {
}
private function getReadMoreButton($post) {
- if($this->args['readMoreType'] === 'button') {
+ if ($this->args['readMoreType'] === 'button') {
$button = $this->args['readMoreButton'];
$button['url'] = get_permalink($post->ID);
return $button;
@@ -204,11 +204,11 @@ class PostTransformer {
$title = $post->post_title;
$top_padding = '20px';
- if(filter_var($this->args['titleIsLink'], FILTER_VALIDATE_BOOLEAN)) {
+ if (filter_var($this->args['titleIsLink'], FILTER_VALIDATE_BOOLEAN)) {
$title = '' . $title . ' ';
}
- if(in_array($this->args['titleFormat'], array('h1', 'h2', 'h3'))) {
+ if (in_array($this->args['titleFormat'], array('h1', 'h2', 'h3'))) {
$tag = $this->args['titleFormat'];
} elseif ($this->args['titleFormat'] === 'ul') {
$tag = 'li';
diff --git a/lib/Newsletter/Editor/StructureTransformer.php b/lib/Newsletter/Editor/StructureTransformer.php
index ad7413789b..2663decbef 100644
--- a/lib/Newsletter/Editor/StructureTransformer.php
+++ b/lib/Newsletter/Editor/StructureTransformer.php
@@ -5,7 +5,7 @@ use pQuery;
use pQuery\DomNode;
use MailPoet\Util\DOM as DOMUtil;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class StructureTransformer {
@@ -27,7 +27,7 @@ class StructureTransformer {
$top_ancestor = DOMUtil::findTopAncestor($item);
$offset = $top_ancestor->index();
- if($item->hasParent('a') || $item->hasParent('figure')) {
+ if ($item->hasParent('a') || $item->hasParent('figure')) {
$item = $item->parent;
}
@@ -42,7 +42,7 @@ class StructureTransformer {
private function transformTagsToBlocks(DomNode $root, $image_full_width) {
$children = $this->filterOutFiguresWithoutImages($root->children);
return array_map(function($item) use ($image_full_width) {
- if($this->isImageElement($item)) {
+ if ($this->isImageElement($item)) {
$image = $item->tag === 'img' ? $item : $item->query('img')[0];
$width = $image->getAttribute('width');
$height = $image->getAttribute('height');
@@ -72,7 +72,7 @@ class StructureTransformer {
private function filterOutFiguresWithoutImages(array $items) {
$items = array_filter($items, function (DomNode $item) {
- if($item->tag === 'figure' && $item->query('img')->count() === 0) {
+ if ($item->tag === 'figure' && $item->query('img')->count() === 0) {
return false;
}
return true;
@@ -86,7 +86,7 @@ class StructureTransformer {
private function getImageAlignment(DomNode $image) {
$alignItem = $image->hasParent('figure') ? $image->parent : $image;
- if($alignItem->hasClass('aligncenter')) {
+ if ($alignItem->hasClass('aligncenter')) {
$align = 'center';
} elseif ($alignItem->hasClass('alignleft')) {
$align = 'left';
@@ -106,11 +106,11 @@ class StructureTransformer {
$updated_structure = array();
$text_accumulator = '';
foreach ($structure as $item) {
- if($item['type'] === 'text') {
+ if ($item['type'] === 'text') {
$text_accumulator .= $item['text'];
}
- if($item['type'] !== 'text') {
- if(!empty($text_accumulator)) {
+ if ($item['type'] !== 'text') {
+ if (!empty($text_accumulator)) {
$updated_structure[] = array(
'type' => 'text',
'text' => trim($text_accumulator),
@@ -121,7 +121,7 @@ class StructureTransformer {
}
}
- if(!empty($text_accumulator)) {
+ if (!empty($text_accumulator)) {
$updated_structure[] = array(
'type' => 'text',
'text' => trim($text_accumulator),
diff --git a/lib/Newsletter/Editor/TitleListTransformer.php b/lib/Newsletter/Editor/TitleListTransformer.php
index 10d9a854f8..fa7f4c2e3e 100644
--- a/lib/Newsletter/Editor/TitleListTransformer.php
+++ b/lib/Newsletter/Editor/TitleListTransformer.php
@@ -1,7 +1,7 @@
args['titleAlignment'];
$alignment = (in_array($alignment, array('left', 'right', 'center'))) ? $alignment : 'left';
- if($this->args['titleIsLink']) {
+ if ($this->args['titleIsLink']) {
$title = '' . $title . ' ';
}
diff --git a/lib/Newsletter/Editor/Transformer.php b/lib/Newsletter/Editor/Transformer.php
index 8bb8c0e638..b1a26c2078 100644
--- a/lib/Newsletter/Editor/Transformer.php
+++ b/lib/Newsletter/Editor/Transformer.php
@@ -4,7 +4,7 @@ namespace MailPoet\Newsletter\Editor;
use MailPoet\Newsletter\Editor\TitleListTransformer;
use MailPoet\Newsletter\Editor\PostListTransformer;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Transformer {
@@ -13,7 +13,7 @@ class Transformer {
function __construct($args) {
$title_list_only = $args['displayType'] === 'titleOnly' && $args['titleFormat'] === 'ul';
- if($title_list_only) $transformer = new TitleListTransformer($args);
+ if ($title_list_only) $transformer = new TitleListTransformer($args);
else $transformer = new PostListTransformer($args);
$this->transformer = $transformer;
}
diff --git a/lib/Newsletter/Links/Links.php b/lib/Newsletter/Links/Links.php
index e56fed9fae..17879ad3df 100644
--- a/lib/Newsletter/Links/Links.php
+++ b/lib/Newsletter/Links/Links.php
@@ -32,7 +32,7 @@ class Links {
$content,
$categories = array(Link::CATEGORY_NAME)
);
- if($shortcodes) {
+ if ($shortcodes) {
$extracted_links = array_map(function($shortcode) {
return array(
'type' => Links::LINK_TYPE_SHORTCODE,
@@ -43,7 +43,7 @@ class Links {
// extract HTML anchor tags
$DOM = DomParser::parseStr($content);
foreach ($DOM->query('a') as $link) {
- if(!$link->href) continue;
+ if (!$link->href) continue;
$extracted_links[] = array(
'type' => self::LINK_TYPE_URL,
'link' => $link->href
@@ -97,7 +97,7 @@ class Links {
$replacement_link = (!empty($processed_links[$link_to_replace]['processed_link'])) ?
$processed_links[$link_to_replace]['processed_link'] :
null;
- if(!$replacement_link) continue;
+ if (!$replacement_link) continue;
$link->setAttribute('href', $replacement_link);
}
$content = $DOM->__toString();
@@ -105,7 +105,7 @@ class Links {
foreach ($processed_links as $processed_link) {
$link_to_replace = $processed_link['link'];
$replacement_link = $processed_link['processed_link'];
- if($processed_link['type'] == self::LINK_TYPE_SHORTCODE) {
+ if ($processed_link['type'] == self::LINK_TYPE_SHORTCODE) {
$content = str_replace($link_to_replace, $replacement_link, $content);
}
$content = preg_replace(
@@ -131,7 +131,7 @@ class Links {
preg_match_all(self::getLinkRegex(), $content, $matches);
foreach ($matches[1] as $index => $match) {
$hash = null;
- if(preg_match('/-/', $match)) {
+ if (preg_match('/-/', $match)) {
list(, $hash) = explode('-', $match);
}
$data = self::createUrlDataObject(
@@ -158,7 +158,7 @@ class Links {
foreach ($links as $link) {
if (isset($link['id']))
continue;
- if(empty($link['hash']) || empty($link['link'])) continue;
+ if (empty($link['hash']) || empty($link['link'])) continue;
$newsletter_link = NewsletterLink::create();
$newsletter_link->newsletter_id = $newsletter_id;
$newsletter_link->queue_id = $queue_id;
@@ -173,13 +173,13 @@ class Links {
$links = array_unique(Helpers::flattenArray($links));
foreach ($links as $link) {
$link_hash = explode('-', $link);
- if(!isset($link_hash[1])) continue;
+ if (!isset($link_hash[1])) continue;
$newsletter_link = NewsletterLink::where('hash', $link_hash[1])
->where('queue_id', $queue_id)
->findOne();
// convert either only link shortcodes or all hashes links if "convert all"
// option is specified
- if($newsletter_link &&
+ if ($newsletter_link &&
(preg_match('/\[link:/', $newsletter_link->url) || $convert_all)
) {
$content = str_replace($link, $newsletter_link->url, $content);
@@ -210,7 +210,7 @@ class Links {
static function transformUrlDataObject($data) {
reset($data);
- if(!is_int(key($data))) return $data;
+ if (!is_int(key($data))) return $data;
$transformed_data = array();
$transformed_data['subscriber_id'] = (!empty($data[0])) ? $data[0] : false;
$transformed_data['subscriber_token'] = (!empty($data[1])) ? $data[1] : false;
diff --git a/lib/Newsletter/Renderer/Blocks/Footer.php b/lib/Newsletter/Renderer/Blocks/Footer.php
index e1696dbd59..a4a919afb3 100644
--- a/lib/Newsletter/Renderer/Blocks/Footer.php
+++ b/lib/Newsletter/Renderer/Blocks/Footer.php
@@ -14,9 +14,9 @@ class Footer {
);
$DOM_parser = new pQuery();
$DOM = $DOM_parser->parseStr($element['text']);
- if(isset($element['styles']['link'])) {
+ if (isset($element['styles']['link'])) {
$links = $DOM->query('a');
- if($links->count()) {
+ if ($links->count()) {
$css = new CSS();
foreach ($links as $link) {
$element_link_styles = StylesHelper::getStyles($element['styles'], 'link');
@@ -28,7 +28,7 @@ class Footer {
$background_color = ($background_color !== 'transparent') ?
'bgcolor="' . $background_color . '"' :
false;
- if(!$background_color) unset($element['styles']['block']['backgroundColor']);
+ if (!$background_color) unset($element['styles']['block']['backgroundColor']);
$template = '
diff --git a/lib/Newsletter/Renderer/Blocks/Text.php b/lib/Newsletter/Renderer/Blocks/Text.php
index 1096794a59..13bcd94e80 100644
--- a/lib/Newsletter/Renderer/Blocks/Text.php
+++ b/lib/Newsletter/Renderer/Blocks/Text.php
@@ -34,15 +34,15 @@ class Text {
$contents = array();
$paragraphs = $blockquote->query('p, h1, h2, h3, h4', 0);
foreach ($paragraphs as $index => $paragraph) {
- if(preg_match('/h\d/', $paragraph->getTag())) {
+ if (preg_match('/h\d/', $paragraph->getTag())) {
$contents[] = $paragraph->getOuterText();
} else {
$contents[] = $paragraph->html();
}
- if($index + 1 < $paragraphs->count()) $contents[] = ' ';
+ if ($index + 1 < $paragraphs->count()) $contents[] = ' ';
$paragraph->remove();
}
- if(empty($contents)) continue;
+ if (empty($contents)) continue;
$blockquote->setTag('table');
$blockquote->addClass('mailpoet_blockquote');
$blockquote->width = '100%';
@@ -75,10 +75,10 @@ class Text {
$DOM_parser = new pQuery();
$DOM = $DOM_parser->parseStr($html);
$paragraphs = $DOM->query('p');
- if(!$paragraphs->count()) return $html;
+ if (!$paragraphs->count()) return $html;
foreach ($paragraphs as $paragraph) {
// process empty paragraphs
- if(!trim($paragraph->html())) {
+ if (!trim($paragraph->html())) {
$next_element = ($paragraph->getNextSibling()) ?
trim($paragraph->getNextSibling()->text()) :
false;
@@ -90,7 +90,7 @@ class Text {
false;
// if previous or next paragraphs are empty OR previous paragraph
// is a heading, insert a break line
- if(!$next_element ||
+ if (!$next_element ||
!$previous_element ||
(preg_match('/h\d+/', $previous_element_tag))
) {
@@ -100,7 +100,7 @@ class Text {
continue;
}
$style = $paragraph->style;
- if(!preg_match('/text-align/i', $style)) {
+ if (!preg_match('/text-align/i', $style)) {
$style = 'text-align: left;' . $style;
}
$contents = $paragraph->html();
@@ -117,7 +117,7 @@ class Text {
$line_breaks = ($next_element && preg_match('/getOuterText())) ?
' ' :
$line_breaks;
- if($paragraph->hasClass(PostContentManager::WP_POST_CLASS)) {
+ if ($paragraph->hasClass(PostContentManager::WP_POST_CLASS)) {
$paragraph->removeClass(PostContentManager::WP_POST_CLASS);
// if this element is followed by a paragraph, add double line breaks
$line_breaks = ($next_element && preg_match('/getOuterText())) ?
@@ -139,9 +139,9 @@ class Text {
$DOM_parser = new pQuery();
$DOM = $DOM_parser->parseStr($html);
$lists = $DOM->query('ol, ul, li');
- if(!$lists->count()) return $html;
+ if (!$lists->count()) return $html;
foreach ($lists as $list) {
- if($list->tag === 'li') {
+ if ($list->tag === 'li') {
$list->setInnertext($list->html());
$list->class = 'mailpoet_paragraph';
} else {
@@ -158,7 +158,7 @@ class Text {
$DOM_parser = new pQuery();
$DOM = $DOM_parser->parseStr($html);
$headings = $DOM->query('h1, h2, h3, h4');
- if(!$headings->count()) return $html;
+ if (!$headings->count()) return $html;
foreach ($headings as $heading) {
$heading->style = StylesHelper::applyTextAlignment($heading->style);
$heading->style .= 'padding:0;font-style:normal;font-weight:normal;';
diff --git a/lib/Newsletter/Renderer/Columns/ColumnsHelper.php b/lib/Newsletter/Renderer/Columns/ColumnsHelper.php
index e5a093b3ef..972f0c7610 100644
--- a/lib/Newsletter/Renderer/Columns/ColumnsHelper.php
+++ b/lib/Newsletter/Renderer/Columns/ColumnsHelper.php
@@ -24,7 +24,7 @@ class ColumnsHelper {
/** @return int[] */
static function columnWidth($columns_count, $columns_layout) {
- if(isset(self::$columns_width[$columns_layout])) {
+ if (isset(self::$columns_width[$columns_layout])) {
return self::$columns_width[$columns_layout];
}
return self::$columns_width[$columns_count];
diff --git a/lib/Newsletter/Renderer/Columns/Renderer.php b/lib/Newsletter/Renderer/Columns/Renderer.php
index e1b15d9bb0..271868e3b1 100644
--- a/lib/Newsletter/Renderer/Columns/Renderer.php
+++ b/lib/Newsletter/Renderer/Columns/Renderer.php
@@ -7,7 +7,7 @@ class Renderer {
$columns_count = count($content_block['blocks']);
- if($columns_count === 1) {
+ if ($columns_count === 1) {
return $this->renderOneColumn($content_block, $columns_data[0]);
}
return $this->renderMultipleColumns($content_block, $columns_data);
@@ -105,7 +105,7 @@ class Renderer {
}
private function getBackgroundCss($styles, $image) {
- if($image !== null && $image['src'] !== null) {
+ if ($image !== null && $image['src'] !== null) {
$background_color = isset($styles['backgroundColor']) && $styles['backgroundColor'] !== 'transparent' ? $styles['backgroundColor'] : '#ffffff';
$repeat = $image['display'] === 'tile' ? 'repeat' : 'no-repeat';
$size = $image['display'] === 'scale' ? 'cover' : 'contain';
@@ -114,7 +114,7 @@ class Renderer {
$background_color, $image['src'], $repeat, $size, $background_color, $image['src'], $repeat, $size
);
} else {
- if(!isset($styles['backgroundColor'])) return false;
+ if (!isset($styles['backgroundColor'])) return false;
$background_color = $styles['backgroundColor'];
return ($background_color !== 'transparent') ?
sprintf('background-color:%s!important;" bgcolor="%s', $background_color, $background_color) :
diff --git a/lib/Newsletter/Renderer/Renderer.php b/lib/Newsletter/Renderer/Renderer.php
index b7867caa20..b828cf6133 100644
--- a/lib/Newsletter/Renderer/Renderer.php
+++ b/lib/Newsletter/Renderer/Renderer.php
@@ -6,7 +6,7 @@ use MailPoet\Services\Bridge;
use MailPoet\Util\License\License;
use MailPoet\Util\pQuery\pQuery;
-if(!defined('ABSPATH')) exit;
+if (!defined('ABSPATH')) exit;
class Renderer {
public $blocks_renderer;
@@ -46,7 +46,7 @@ class Renderer {
? $body['globalStyles']
: array();
- if(!$this->premium_activated && !$this->mss_activated && !$this->preview) {
+ if (!$this->premium_activated && !$this->mss_activated && !$this->preview) {
$content = $this->addMailpoetLogoContentBlock($content, $styles);
}
@@ -81,7 +81,7 @@ class Renderer {
? $content['blocks']
: array();
foreach ($content_blocks as $block) {
- if($block['type'] === 'automatedLatestContentLayout') {
+ if ($block['type'] === 'automatedLatestContentLayout') {
$blocks = array_merge(
$blocks,
$this->blocks_renderer->automatedLatestContentTransformedPosts($block)
@@ -173,7 +173,7 @@ class Renderer {
}
function addMailpoetLogoContentBlock($content, $styles) {
- if(empty($content['blocks'])) return $content;
+ if (empty($content['blocks'])) return $content;
$content['blocks'][] = array(
'type' => 'container',
'orientation' => 'horizontal',
diff --git a/lib/Newsletter/Renderer/StylesHelper.php b/lib/Newsletter/Renderer/StylesHelper.php
index c29f646db0..26fd2d7e27 100644
--- a/lib/Newsletter/Renderer/StylesHelper.php
+++ b/lib/Newsletter/Renderer/StylesHelper.php
@@ -62,7 +62,7 @@ class StylesHelper {
static $padding_width = 20;
static function getBlockStyles($element, $ignore_specific_styles = false) {
- if(!isset($element['styles']['block'])) {
+ if (!isset($element['styles']['block'])) {
return;
}
return self::getStyles($element['styles'], 'block', $ignore_specific_styles);
@@ -70,7 +70,7 @@ class StylesHelper {
static function getStyles($data, $type, $ignore_specific_styles = false) {
$styles = array_map(function($attribute, $style) use ($ignore_specific_styles) {
- if(!$ignore_specific_styles || !in_array($attribute, $ignore_specific_styles)) {
+ if (!$ignore_specific_styles || !in_array($attribute, $ignore_specific_styles)) {
$style = StylesHelper::applyFontFamily($attribute, $style);
return StylesHelper::translateCSSAttribute($attribute) . ': ' . $style . ' !important;';
}
@@ -97,11 +97,11 @@ class StylesHelper {
}
static function applyTextAlignment($block) {
- if(is_array($block)) {
+ if (is_array($block)) {
$text_alignment = isset($block['styles']['block']['textAlign']) ?
strtolower($block['styles']['block']['textAlign']) :
false;
- if(preg_match('/center|right|justify/i', $text_alignment)) {
+ if (preg_match('/center|right|justify/i', $text_alignment)) {
return $block;
}
$block['styles']['block']['textAlign'] = 'left';
@@ -113,21 +113,21 @@ class StylesHelper {
}
static function applyFontFamily($attribute, $style) {
- if($attribute !== 'fontFamily') return $style;
+ if ($attribute !== 'fontFamily') return $style;
return (isset(self::$font[$style])) ?
self::$font[$style] :
self::$font['Arial'];
}
static function applyHeadingMargin($style, $selector) {
- if(!preg_match('/h[1-4]/i', $selector)) return $style;
+ if (!preg_match('/h[1-4]/i', $selector)) return $style;
$font_size = (int)$style['fontSize'];
$style['margin'] = sprintf('0 0 %spx 0', self::$heading_margin_multiplier * $font_size);
return $style;
}
static function applyLineHeight($style, $selector) {
- if(!preg_match('/mailpoet_paragraph|h[1-4]/i', $selector)) return $style;
+ if (!preg_match('/mailpoet_paragraph|h[1-4]/i', $selector)) return $style;
$font_size = (int)$style['fontSize'];
$style['lineHeight'] = sprintf('%spx', self::$line_height_multiplier * $font_size);
return $style;
@@ -136,7 +136,7 @@ class StylesHelper {
private static function getCustomFontsNames($styles) {
$font_names = [];
foreach ($styles as $style) {
- if(isset($style['fontFamily']) && in_array($style['fontFamily'], self::$custom_fonts)) {
+ if (isset($style['fontFamily']) && in_array($style['fontFamily'], self::$custom_fonts)) {
$font_names[$style['fontFamily']] = true;
}
}
@@ -148,7 +148,7 @@ class StylesHelper {
foreach (self::getCustomFontsNames($styles) as $name) {
$links[] = urlencode($name) . ':400,400i,700,700i';
}
- if(!count($links)) {
+ if (!count($links)) {
return '';
}
return '