Replace all WP function calls

This commit is contained in:
Amine Ben hammou
2019-02-20 18:56:48 +01:00
committed by M. Shull
parent 986482e34b
commit 0a436087e1
176 changed files with 1066 additions and 803 deletions

View File

@@ -1,8 +1,11 @@
<?php
namespace MailPoet\Config\PopulatorData\Templates;
use MailPoet\WP\Functions as WPFunctions;
if (!defined('ABSPATH')) exit;
class SimpleText {
private $assets_url;
@@ -19,7 +22,7 @@ class SimpleText {
function get() {
return array(
'name' => __("Simple Text", 'mailpoet'),
'name' => WPFunctions::get()->__("Simple Text", 'mailpoet'),
'categories' => json_encode(array('standard', 'all')),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
@@ -69,7 +72,7 @@ class SimpleText {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
"alt" => __("Fake logo", 'mailpoet'),
"alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -81,7 +84,7 @@ class SimpleText {
),
array(
"type" => "text",
"text" => __("<p style=\"text-align: left;\">Hi [subscriber:firstname | default:subscriber],</p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">In MailPoet, you can write emails in plain text, just like in a regular email. This can make your email newsletters more personal and attention-grabbing.</p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">Is this too simple? You can still style your text with basic formatting, like <strong>bold</strong> or <em>italics.</em></p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">Finally, you can also add a call-to-action button between 2 blocks of text, like this:</p>", 'mailpoet')
"text" => WPFunctions::get()->__("<p style=\"text-align: left;\">Hi [subscriber:firstname | default:subscriber],</p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">In MailPoet, you can write emails in plain text, just like in a regular email. This can make your email newsletters more personal and attention-grabbing.</p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">Is this too simple? You can still style your text with basic formatting, like <strong>bold</strong> or <em>italics.</em></p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">Finally, you can also add a call-to-action button between 2 blocks of text, like this:</p>", 'mailpoet')
)
)
)
@@ -116,7 +119,7 @@ class SimpleText {
),
array(
"type" => "button",
"text" => __("It's time to take action!", 'mailpoet'),
"text" => WPFunctions::get()->__("It's time to take action!", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -137,11 +140,11 @@ class SimpleText {
),
array(
"type" => "text",
"text" => __("<p>Thanks for reading. See you soon!</p>\n<p>&nbsp;</p>\n<p><strong><em>The MailPoet Team</em></strong></p>", 'mailpoet')
"text" => WPFunctions::get()->__("<p>Thanks for reading. See you soon!</p>\n<p>&nbsp;</p>\n<p><strong><em>The MailPoet Team</em></strong></p>", 'mailpoet')
),
array(
"type" => "footer",
"text" => __("<p><a href=\"[link:subscription_unsubscribe_url]\">Unsubscribe</a> | <a href=\"[link:subscription_manage_url]\">Manage your subscription</a><br />Add your postal address here!</p>", 'mailpoet'),
"text" => WPFunctions::get()->__("<p><a href=\"[link:subscription_unsubscribe_url]\">Unsubscribe</a> | <a href=\"[link:subscription_manage_url]\">Manage your subscription</a><br />Add your postal address here!</p>", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"