diff --git a/mailpoet/lib/API/JSON/API.php b/mailpoet/lib/API/JSON/API.php index fab25dc0e2..d434fd70c7 100644 --- a/mailpoet/lib/API/JSON/API.php +++ b/mailpoet/lib/API/JSON/API.php @@ -106,7 +106,7 @@ class API { ); if (!$ignoreToken && $this->wp->wpVerifyNonce($this->requestToken, 'mailpoet_token') === false) { - $errorMessage = WPFunctions::get()->__("Sorry, but we couldn't connect to the MailPoet server. Please refresh the web page and try again.", 'mailpoet'); + $errorMessage = __("Sorry, but we couldn't connect to the MailPoet server. Please refresh the web page and try again.", 'mailpoet'); $errorResponse = $this->createErrorResponse(Error::UNAUTHORIZED, $errorMessage, Response::STATUS_UNAUTHORIZED); return $errorResponse->send(); } @@ -134,7 +134,7 @@ class API { : null; if (!$this->requestEndpoint || !$this->requestMethod || !$this->requestApiVersion) { - $errorMessage = WPFunctions::get()->__('Invalid API request.', 'mailpoet'); + $errorMessage = __('Invalid API request.', 'mailpoet'); $errorResponse = $this->createErrorResponse(Error::BAD_REQUEST, $errorMessage, Response::STATUS_BAD_REQUEST); return $errorResponse; } else if (!empty($this->endpointNamespaces[$this->requestApiVersion])) { @@ -202,7 +202,7 @@ class API { // check the accessibility of the requested endpoint's action // by default, an endpoint's action is considered "private" if (!$this->validatePermissions($this->requestMethod, $endpoint->permissions)) { - $errorMessage = WPFunctions::get()->__('You do not have the required permissions.', 'mailpoet'); + $errorMessage = __('You do not have the required permissions.', 'mailpoet'); $errorResponse = $this->createErrorResponse(Error::FORBIDDEN, $errorMessage, Response::STATUS_FORBIDDEN); return $errorResponse; } diff --git a/mailpoet/lib/API/JSON/Endpoint.php b/mailpoet/lib/API/JSON/Endpoint.php index 341521b0be..dffe15c196 100644 --- a/mailpoet/lib/API/JSON/Endpoint.php +++ b/mailpoet/lib/API/JSON/Endpoint.php @@ -3,7 +3,6 @@ namespace MailPoet\API\JSON; use MailPoet\Config\AccessControl; -use MailPoet\WP\Functions as WPFunctions; abstract class Endpoint { const TYPE_POST = 'POST'; @@ -27,7 +26,7 @@ abstract class Endpoint { ) { if (empty($errors)) { $errors = [ - Error::UNKNOWN => WPFunctions::get()->__('An unknown error occurred.', 'mailpoet'), + Error::UNKNOWN => __('An unknown error occurred.', 'mailpoet'), ]; } return new ErrorResponse($errors, $meta, $status); @@ -36,7 +35,7 @@ abstract class Endpoint { public function badRequest($errors = [], $meta = []) { if (empty($errors)) { $errors = [ - Error::BAD_REQUEST => WPFunctions::get()->__('Invalid request parameters', 'mailpoet'), + Error::BAD_REQUEST => __('Invalid request parameters', 'mailpoet'), ]; } return new ErrorResponse($errors, $meta, Response::STATUS_BAD_REQUEST); diff --git a/mailpoet/lib/API/JSON/ErrorHandler.php b/mailpoet/lib/API/JSON/ErrorHandler.php index 5963c251f7..dd935471b9 100644 --- a/mailpoet/lib/API/JSON/ErrorHandler.php +++ b/mailpoet/lib/API/JSON/ErrorHandler.php @@ -4,17 +4,14 @@ namespace MailPoet\API\JSON; use MailPoet\Exception; use MailPoet\HttpAwareException; -use MailPoet\WP\Functions as WPFunctions; class ErrorHandler { /** @var string[] */ private $defaultErrors; - public function __construct( - WPFunctions $wp - ) { + public function __construct() { $this->defaultErrors = [ - Error::UNKNOWN => $wp->__('An unknown error occurred.', 'mailpoet'), + Error::UNKNOWN => __('An unknown error occurred.', 'mailpoet'), ]; } diff --git a/mailpoet/lib/API/JSON/ErrorResponse.php b/mailpoet/lib/API/JSON/ErrorResponse.php index 0c612fcf5f..8bb91bd54a 100644 --- a/mailpoet/lib/API/JSON/ErrorResponse.php +++ b/mailpoet/lib/API/JSON/ErrorResponse.php @@ -2,8 +2,6 @@ namespace MailPoet\API\JSON; -use MailPoet\WP\Functions as WPFunctions; - class ErrorResponse extends Response { public $errors; @@ -24,7 +22,7 @@ class ErrorResponse extends Response { return array_map(function($error, $message) { // sanitize SQL error if (preg_match('/^SQLSTATE/i', $message)) { - $message = WPFunctions::get()->__('An unknown error occurred.', 'mailpoet'); + $message = __('An unknown error occurred.', 'mailpoet'); } return [ 'error' => $error, diff --git a/mailpoet/lib/API/JSON/v1/AutomaticEmails.php b/mailpoet/lib/API/JSON/v1/AutomaticEmails.php index 58f4877e6d..b6ad744891 100644 --- a/mailpoet/lib/API/JSON/v1/AutomaticEmails.php +++ b/mailpoet/lib/API/JSON/v1/AutomaticEmails.php @@ -36,7 +36,7 @@ class AutomaticEmails extends APIEndpoint { if (!$query || !$filter || !$emailSlug || !$eventSlug) { return $this->errorResponse( [ - APIError::BAD_REQUEST => WPFunctions::get()->__('Improperly formatted request.', 'mailpoet'), + APIError::BAD_REQUEST => __('Improperly formatted request.', 'mailpoet'), ] ); } @@ -48,7 +48,7 @@ class AutomaticEmails extends APIEndpoint { $this->successResponse($this->wp->applyFilters($eventFilter, $query)) : $this->errorResponse( [ - APIError::BAD_REQUEST => WPFunctions::get()->__('Automatic email event filter does not exist.', 'mailpoet'), + APIError::BAD_REQUEST => __('Automatic email event filter does not exist.', 'mailpoet'), ] ); } @@ -60,7 +60,7 @@ class AutomaticEmails extends APIEndpoint { if (!$emailSlug || !$eventSlug) { return $this->errorResponse( [ - APIError::BAD_REQUEST => WPFunctions::get()->__('Improperly formatted request.', 'mailpoet'), + APIError::BAD_REQUEST => __('Improperly formatted request.', 'mailpoet'), ] ); } @@ -71,7 +71,7 @@ class AutomaticEmails extends APIEndpoint { if (!$event) { return $this->errorResponse( [ - APIError::BAD_REQUEST => WPFunctions::get()->__('Automatic email event does not exist.', 'mailpoet'), + APIError::BAD_REQUEST => __('Automatic email event does not exist.', 'mailpoet'), ] ); } diff --git a/mailpoet/lib/API/JSON/v1/CustomFields.php b/mailpoet/lib/API/JSON/v1/CustomFields.php index 0a1e69898f..2fc2bebc0c 100644 --- a/mailpoet/lib/API/JSON/v1/CustomFields.php +++ b/mailpoet/lib/API/JSON/v1/CustomFields.php @@ -9,7 +9,6 @@ use MailPoet\API\JSON\ResponseBuilders\CustomFieldsResponseBuilder; use MailPoet\Config\AccessControl; use MailPoet\CustomFields\CustomFieldsRepository; use MailPoet\Entities\CustomFieldEntity; -use MailPoet\WP\Functions as WPFunctions; class CustomFields extends APIEndpoint { public $permissions = [ @@ -45,7 +44,7 @@ class CustomFields extends APIEndpoint { return $this->successResponse($this->customFieldsResponseBuilder->build($customField)); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This custom field does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This custom field does not exist.', 'mailpoet'), ]); } } @@ -68,7 +67,7 @@ class CustomFields extends APIEndpoint { return $this->successResponse($this->customFieldsResponseBuilder->build($customField)); } return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This custom field does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This custom field does not exist.', 'mailpoet'), ]); } } diff --git a/mailpoet/lib/API/JSON/v1/DynamicSegments.php b/mailpoet/lib/API/JSON/v1/DynamicSegments.php index f9a4499a3b..8f99be20e7 100644 --- a/mailpoet/lib/API/JSON/v1/DynamicSegments.php +++ b/mailpoet/lib/API/JSON/v1/DynamicSegments.php @@ -19,7 +19,6 @@ use MailPoet\Segments\DynamicSegments\SegmentSaveController; use MailPoet\Segments\SegmentsRepository; use MailPoet\Segments\SegmentSubscribersRepository; use MailPoet\UnexpectedValueException; -use MailPoet\WP\Functions as WPFunctions; class DynamicSegments extends APIEndpoint { @@ -76,14 +75,14 @@ class DynamicSegments extends APIEndpoint { $id = (int)$data['id']; } else { return $this->errorResponse([ - Error::BAD_REQUEST => WPFunctions::get()->__('Missing mandatory argument `id`.', 'mailpoet'), + Error::BAD_REQUEST => __('Missing mandatory argument `id`.', 'mailpoet'), ]); } $segment = $this->segmentsRepository->findOneById($id); if (!$segment instanceof SegmentEntity) { return $this->errorResponse([ - Error::NOT_FOUND => WPFunctions::get()->__('This segment does not exist.', 'mailpoet'), + Error::NOT_FOUND => __('This segment does not exist.', 'mailpoet'), ]); } @@ -126,48 +125,48 @@ class DynamicSegments extends APIEndpoint { private function getErrorString(InvalidFilterException $e) { switch ($e->getCode()) { case InvalidFilterException::MISSING_TYPE: - return WPFunctions::get()->__('The segment type is missing.', 'mailpoet'); + return __('The segment type is missing.', 'mailpoet'); case InvalidFilterException::INVALID_TYPE: - return WPFunctions::get()->__('The segment type is unknown.', 'mailpoet'); + return __('The segment type is unknown.', 'mailpoet'); case InvalidFilterException::MISSING_ROLE: - return WPFunctions::get()->__('Please select a user role.', 'mailpoet'); + return __('Please select a user role.', 'mailpoet'); case InvalidFilterException::MISSING_ACTION: case InvalidFilterException::INVALID_EMAIL_ACTION: - return WPFunctions::get()->__('Please select an email action.', 'mailpoet'); + return __('Please select an email action.', 'mailpoet'); case InvalidFilterException::MISSING_NEWSLETTER_ID: - return WPFunctions::get()->__('Please select an email.', 'mailpoet'); + return __('Please select an email.', 'mailpoet'); case InvalidFilterException::MISSING_PRODUCT_ID: - return WPFunctions::get()->__('Please select a product.', 'mailpoet'); + return __('Please select a product.', 'mailpoet'); case InvalidFilterException::MISSING_COUNTRY: - return WPFunctions::get()->__('Please select a country.', 'mailpoet'); + return __('Please select a country.', 'mailpoet'); case InvalidFilterException::MISSING_CATEGORY_ID: - return WPFunctions::get()->__('Please select a category.', 'mailpoet'); + return __('Please select a category.', 'mailpoet'); case InvalidFilterException::MISSING_VALUE: - return WPFunctions::get()->__('Please fill all required values.', 'mailpoet'); + return __('Please fill all required values.', 'mailpoet'); case InvalidFilterException::MISSING_NUMBER_OF_ORDERS_FIELDS: - return WPFunctions::get()->__('Please select a type for the comparison, a number of orders and a number of days.', 'mailpoet'); + return __('Please select a type for the comparison, a number of orders and a number of days.', 'mailpoet'); case InvalidFilterException::MISSING_TOTAL_SPENT_FIELDS: - return WPFunctions::get()->__('Please select a type for the comparison, an amount and a number of days.', 'mailpoet'); + return __('Please select a type for the comparison, an amount and a number of days.', 'mailpoet'); case InvalidFilterException::MISSING_FILTER: - return WPFunctions::get()->__('Please add at least one condition for filtering.', 'mailpoet'); + return __('Please add at least one condition for filtering.', 'mailpoet'); case InvalidFilterException::MISSING_OPERATOR: - return WPFunctions::get()->__('Please select a type for the comparison.', 'mailpoet'); + return __('Please select a type for the comparison.', 'mailpoet'); default: - return WPFunctions::get()->__('An error occurred while saving data.', 'mailpoet'); + return __('An error occurred while saving data.', 'mailpoet'); } } public function trash($data = []) { if (!isset($data['id'])) { return $this->errorResponse([ - Error::BAD_REQUEST => WPFunctions::get()->__('Missing mandatory argument `id`.', 'mailpoet'), + Error::BAD_REQUEST => __('Missing mandatory argument `id`.', 'mailpoet'), ]); } $segment = $this->getSegment($data); if ($segment === null) { return $this->errorResponse([ - Error::NOT_FOUND => WPFunctions::get()->__('This segment does not exist.', 'mailpoet'), + Error::NOT_FOUND => __('This segment does not exist.', 'mailpoet'), ]); } @@ -192,14 +191,14 @@ class DynamicSegments extends APIEndpoint { public function restore($data = []) { if (!isset($data['id'])) { return $this->errorResponse([ - Error::BAD_REQUEST => WPFunctions::get()->__('Missing mandatory argument `id`.', 'mailpoet'), + Error::BAD_REQUEST => __('Missing mandatory argument `id`.', 'mailpoet'), ]); } $segment = $this->getSegment($data); if ($segment === null) { return $this->errorResponse([ - Error::NOT_FOUND => WPFunctions::get()->__('This segment does not exist.', 'mailpoet'), + Error::NOT_FOUND => __('This segment does not exist.', 'mailpoet'), ]); } @@ -213,14 +212,14 @@ class DynamicSegments extends APIEndpoint { public function delete($data = []) { if (!isset($data['id'])) { return $this->errorResponse([ - Error::BAD_REQUEST => WPFunctions::get()->__('Missing mandatory argument `id`.', 'mailpoet'), + Error::BAD_REQUEST => __('Missing mandatory argument `id`.', 'mailpoet'), ]); } $segment = $this->getSegment($data); if ($segment === null) { return $this->errorResponse([ - Error::NOT_FOUND => WPFunctions::get()->__('This segment does not exist.', 'mailpoet'), + Error::NOT_FOUND => __('This segment does not exist.', 'mailpoet'), ]); } diff --git a/mailpoet/lib/API/JSON/v1/Mailer.php b/mailpoet/lib/API/JSON/v1/Mailer.php index 669a048fa8..5ddc317bfe 100644 --- a/mailpoet/lib/API/JSON/v1/Mailer.php +++ b/mailpoet/lib/API/JSON/v1/Mailer.php @@ -11,7 +11,6 @@ use MailPoet\Mailer\MetaInfo; use MailPoet\Services\AuthorizedEmailsController; use MailPoet\Services\Bridge; use MailPoet\Settings\SettingsController; -use MailPoet\WP\Functions as WPFunctions; class Mailer extends APIEndpoint { @@ -68,7 +67,7 @@ class Mailer extends APIEndpoint { if ($result['response'] === false) { $error = sprintf( - WPFunctions::get()->__('The email could not be sent: %s', 'mailpoet'), + __('The email could not be sent: %s', 'mailpoet'), $result['error']->getMessage() ); return $this->errorResponse([APIError::BAD_REQUEST => $error]); diff --git a/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php b/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php index 1d6a4a4b21..ad70020bfc 100644 --- a/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php +++ b/mailpoet/lib/API/JSON/v1/NewsletterTemplates.php @@ -51,7 +51,7 @@ class NewsletterTemplates extends APIEndpoint { if (!$template) { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This template does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This template does not exist.', 'mailpoet'), ]); } @@ -91,7 +91,7 @@ class NewsletterTemplates extends APIEndpoint { if (!$template) { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This template does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This template does not exist.', 'mailpoet'), ]); } diff --git a/mailpoet/lib/API/JSON/v1/Premium.php b/mailpoet/lib/API/JSON/v1/Premium.php index c3e0275b20..f424ac1f33 100644 --- a/mailpoet/lib/API/JSON/v1/Premium.php +++ b/mailpoet/lib/API/JSON/v1/Premium.php @@ -34,7 +34,7 @@ class Premium extends APIEndpoint { public function installPlugin() { $premiumKeyValid = $this->servicesChecker->isPremiumKeyValid(false); if (!$premiumKeyValid) { - return $this->error($this->wp->__('Premium key is not valid.', 'mailpoet')); + return $this->error(__('Premium key is not valid.', 'mailpoet')); } $pluginInfo = $this->wp->pluginsApi('plugin_information', [ @@ -42,13 +42,13 @@ class Premium extends APIEndpoint { ]); if (!$pluginInfo || $pluginInfo instanceof WP_Error) { - return $this->error($this->wp->__('Error when installing MailPoet Premium plugin.', 'mailpoet')); + return $this->error(__('Error when installing MailPoet Premium plugin.', 'mailpoet')); } $pluginInfo = (array)$pluginInfo; $result = $this->wp->installPlugin($pluginInfo['download_link']); if ($result !== true) { - return $this->error($this->wp->__('Error when installing MailPoet Premium plugin.', 'mailpoet')); + return $this->error(__('Error when installing MailPoet Premium plugin.', 'mailpoet')); } return $this->successResponse(); } @@ -56,12 +56,12 @@ class Premium extends APIEndpoint { public function activatePlugin() { $premiumKeyValid = $this->servicesChecker->isPremiumKeyValid(false); if (!$premiumKeyValid) { - return $this->error($this->wp->__('Premium key is not valid.', 'mailpoet')); + return $this->error(__('Premium key is not valid.', 'mailpoet')); } $result = $this->wp->activatePlugin(self::PREMIUM_PLUGIN_PATH); if ($result !== null) { - return $this->error($this->wp->__('Error when activating MailPoet Premium plugin.', 'mailpoet')); + return $this->error(__('Error when activating MailPoet Premium plugin.', 'mailpoet')); } return $this->successResponse(); } diff --git a/mailpoet/lib/API/JSON/v1/Segments.php b/mailpoet/lib/API/JSON/v1/Segments.php index 45c5f55411..59f4e46a7d 100644 --- a/mailpoet/lib/API/JSON/v1/Segments.php +++ b/mailpoet/lib/API/JSON/v1/Segments.php @@ -24,7 +24,6 @@ use MailPoet\Segments\WooCommerce; use MailPoet\Segments\WP; use MailPoet\Subscribers\SubscribersRepository; use MailPoet\UnexpectedValueException; -use MailPoet\WP\Functions as WPFunctions; class Segments extends APIEndpoint { public $permissions = [ @@ -97,7 +96,7 @@ class Segments extends APIEndpoint { return $this->successResponse($this->segmentsResponseBuilder->build($segment)); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This list does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet'), ]); } } @@ -139,7 +138,7 @@ class Segments extends APIEndpoint { if ($segment instanceof SegmentEntity) { if (!$this->isTrashOrRestoreAllowed($segment)) { return $this->errorResponse([ - APIError::FORBIDDEN => WPFunctions::get()->__('This list cannot be moved to trash.', 'mailpoet'), + APIError::FORBIDDEN => __('This list cannot be moved to trash.', 'mailpoet'), ]); } // When the segment is of type WP_USERS we want to restore all its subscribers @@ -159,7 +158,7 @@ class Segments extends APIEndpoint { ); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This list does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet'), ]); } } @@ -169,13 +168,13 @@ class Segments extends APIEndpoint { if (!$segment instanceof SegmentEntity) { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This list does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet'), ]); } if (!$this->isTrashOrRestoreAllowed($segment)) { return $this->errorResponse([ - APIError::FORBIDDEN => WPFunctions::get()->__('This list cannot be moved to trash.', 'mailpoet'), + APIError::FORBIDDEN => __('This list cannot be moved to trash.', 'mailpoet'), ]); } @@ -231,7 +230,7 @@ class Segments extends APIEndpoint { return $this->successResponse(null, ['count' => 1]); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This list does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet'), ]); } } @@ -253,7 +252,7 @@ class Segments extends APIEndpoint { ); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This list does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet'), ]); } } diff --git a/mailpoet/lib/API/JSON/v1/Services.php b/mailpoet/lib/API/JSON/v1/Services.php index b386e02f5b..9aa00c3afc 100644 --- a/mailpoet/lib/API/JSON/v1/Services.php +++ b/mailpoet/lib/API/JSON/v1/Services.php @@ -76,7 +76,7 @@ class Services extends APIEndpoint { if (!$key) { return $this->badRequest([ - APIError::BAD_REQUEST => $this->wp->__('Please specify a key.', 'mailpoet'), + APIError::BAD_REQUEST => __('Please specify a key.', 'mailpoet'), ]); } @@ -103,10 +103,10 @@ class Services extends APIEndpoint { $successMessage = null; if ($state == Bridge::KEY_VALID) { - $successMessage = $this->wp->__('Your MailPoet Sending Service key has been successfully validated', 'mailpoet'); + $successMessage = __('Your MailPoet Sending Service key has been successfully validated', 'mailpoet'); } elseif ($state == Bridge::KEY_EXPIRING) { $successMessage = sprintf( - $this->wp->__('Your MailPoet Sending Service key expires on %s!', 'mailpoet'), + __('Your MailPoet Sending Service key expires on %s!', 'mailpoet'), $this->dateTime->formatDate(strtotime($result['data']['expire_at'])) ); } @@ -121,17 +121,17 @@ class Services extends APIEndpoint { switch ($state) { case Bridge::KEY_INVALID: - $error = $this->wp->__('Your key is not valid for the MailPoet Sending Service', 'mailpoet'); + $error = __('Your key is not valid for the MailPoet Sending Service', 'mailpoet'); break; case Bridge::KEY_ALREADY_USED: - $error = $this->wp->__('Your MailPoet Sending Service key is already used on another site', 'mailpoet'); + $error = __('Your MailPoet Sending Service key is already used on another site', 'mailpoet'); break; default: $code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN; - $errorMessage = $this->wp->__('Error validating MailPoet Sending Service key, please try again later (%s).', 'mailpoet'); + $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)/", $this->wp->siteUrl())) { - $errorMessage .= ' ' . $this->wp->__("Note that it doesn't work on localhost.", 'mailpoet'); + $errorMessage .= ' ' . __("Note that it doesn't work on localhost.", 'mailpoet'); } $error = sprintf( $errorMessage, @@ -148,7 +148,7 @@ class Services extends APIEndpoint { if (!$key) { return $this->badRequest([ - APIError::BAD_REQUEST => $this->wp->__('Please specify a key.', 'mailpoet'), + APIError::BAD_REQUEST => __('Please specify a key.', 'mailpoet'), ]); } @@ -165,10 +165,10 @@ class Services extends APIEndpoint { $successMessage = null; if ($state == Bridge::KEY_VALID) { - $successMessage = $this->wp->__('Your Premium key has been successfully validated', 'mailpoet'); + $successMessage = __('Your Premium key has been successfully validated', 'mailpoet'); } elseif ($state == Bridge::KEY_EXPIRING) { $successMessage = sprintf( - $this->wp->__('Your Premium key expires on %s', 'mailpoet'), + __('Your Premium key expires on %s', 'mailpoet'), $this->dateTime->formatDate(strtotime($result['data']['expire_at'])) ); } @@ -186,15 +186,15 @@ class Services extends APIEndpoint { switch ($state) { case Bridge::KEY_INVALID: - $error = $this->wp->__('Your key is not valid for MailPoet Premium', 'mailpoet'); + $error = __('Your key is not valid for MailPoet Premium', 'mailpoet'); break; case Bridge::KEY_ALREADY_USED: - $error = $this->wp->__('Your Premium key is already used on another site', 'mailpoet'); + $error = __('Your Premium key is already used on another site', 'mailpoet'); break; default: $code = !empty($result['code']) ? $result['code'] : Bridge::CHECK_ERROR_UNKNOWN; $error = sprintf( - $this->wp->__('Error validating Premium key, please try again later (%s)', 'mailpoet'), + __('Error validating Premium key, please try again later (%s)', 'mailpoet'), $this->getErrorDescriptionByCode($code) ); break; @@ -257,10 +257,10 @@ class Services extends APIEndpoint { private function getErrorDescriptionByCode($code) { switch ($code) { case Bridge::CHECK_ERROR_UNAVAILABLE: - $text = $this->wp->__('Service unavailable', 'mailpoet'); + $text = __('Service unavailable', 'mailpoet'); break; case Bridge::CHECK_ERROR_UNKNOWN: - $text = $this->wp->__('Contact your hosting support to check the connection between your host and https://bridge.mailpoet.com', 'mailpoet'); + $text = __('Contact your hosting support to check the connection between your host and https://bridge.mailpoet.com', 'mailpoet'); break; default: $text = sprintf(_x('code: %s', 'Error code (inside parentheses)', 'mailpoet'), $code); diff --git a/mailpoet/lib/API/JSON/v1/Settings.php b/mailpoet/lib/API/JSON/v1/Settings.php index e18c8959cf..d41e96f6d9 100644 --- a/mailpoet/lib/API/JSON/v1/Settings.php +++ b/mailpoet/lib/API/JSON/v1/Settings.php @@ -119,7 +119,7 @@ class Settings extends APIEndpoint { return $this->badRequest( [ APIError::BAD_REQUEST => - WPFunctions::get()->__('You have not specified any settings to be saved.', 'mailpoet'), + __('You have not specified any settings to be saved.', 'mailpoet'), ]); } else { $oldSettings = $this->settings->getAll(); @@ -178,7 +178,7 @@ class Settings extends APIEndpoint { $address = $data['address'] ?? null; if (!$address) { return $this->badRequest([ - APIError::BAD_REQUEST => WPFunctions::get()->__('No email address specified.', 'mailpoet'), + APIError::BAD_REQUEST => __('No email address specified.', 'mailpoet'), ]); } $address = trim($address); @@ -187,7 +187,7 @@ class Settings extends APIEndpoint { $this->authorizedEmailsController->setFromEmailAddress($address); } catch (\InvalidArgumentException $e) { return $this->badRequest([ - APIError::UNAUTHORIZED => WPFunctions::get()->__('Can’t use this email yet! Please authorize it first.', 'mailpoet'), + APIError::UNAUTHORIZED => __('Can’t use this email yet! Please authorize it first.', 'mailpoet'), ]); } @@ -205,7 +205,7 @@ class Settings extends APIEndpoint { if (!$emailAddress) { return $this->badRequest([ - APIError::BAD_REQUEST => WPFunctions::get()->__('No email address specified.', 'mailpoet'), + APIError::BAD_REQUEST => __('No email address specified.', 'mailpoet'), ]); } @@ -222,7 +222,7 @@ class Settings extends APIEndpoint { $response = ['status' => true]; } else { return $this->badRequest([ - APIError::BAD_REQUEST => WPFunctions::get()->__($e->getMessage(), 'mailpoet'), + APIError::BAD_REQUEST => __($e->getMessage(), 'mailpoet'), ]); } } @@ -235,7 +235,7 @@ class Settings extends APIEndpoint { if (!$emailAddress) { return $this->badRequest([ - APIError::BAD_REQUEST => WPFunctions::get()->__('No email address specified.', 'mailpoet'), + APIError::BAD_REQUEST => __('No email address specified.', 'mailpoet'), ]); } diff --git a/mailpoet/lib/API/JSON/v1/SubscriberStats.php b/mailpoet/lib/API/JSON/v1/SubscriberStats.php index 4b462a7a06..664e3b9b5d 100644 --- a/mailpoet/lib/API/JSON/v1/SubscriberStats.php +++ b/mailpoet/lib/API/JSON/v1/SubscriberStats.php @@ -9,7 +9,6 @@ use MailPoet\Entities\SubscriberEntity; use MailPoet\Newsletter\Statistics\WooCommerceRevenue; use MailPoet\Subscribers\Statistics\SubscriberStatisticsRepository; use MailPoet\Subscribers\SubscribersRepository; -use MailPoet\WP\Functions as WPFunctions; class SubscriberStats extends APIEndpoint { public $permissions = [ @@ -36,7 +35,7 @@ class SubscriberStats extends APIEndpoint { : null; if (!$subscriber instanceof SubscriberEntity) { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet'), ]); } $statistics = $this->subscribersStatisticsRepository->getStatistics($subscriber); diff --git a/mailpoet/lib/API/JSON/v1/Subscribers.php b/mailpoet/lib/API/JSON/v1/Subscribers.php index e02b3fb176..948b8e49ef 100644 --- a/mailpoet/lib/API/JSON/v1/Subscribers.php +++ b/mailpoet/lib/API/JSON/v1/Subscribers.php @@ -24,7 +24,6 @@ use MailPoet\Subscribers\SubscribersRepository; use MailPoet\Subscribers\SubscriberSubscribeController; use MailPoet\UnexpectedValueException; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; class Subscribers extends APIEndpoint { const SUBSCRIPTION_LIMIT_COOLDOWN = 60; @@ -87,7 +86,7 @@ class Subscribers extends APIEndpoint { $subscriber = $this->getSubscriber($data); if (!$subscriber instanceof SubscriberEntity) { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet'), ]); } $result = $this->subscribersResponseBuilder->build($subscriber); @@ -181,7 +180,7 @@ class Subscribers extends APIEndpoint { ); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet'), ]); } } @@ -197,7 +196,7 @@ class Subscribers extends APIEndpoint { ); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet'), ]); } } @@ -209,7 +208,7 @@ class Subscribers extends APIEndpoint { return $this->successResponse(null, ['count' => $count]); } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet'), ]); } } @@ -239,7 +238,7 @@ class Subscribers extends APIEndpoint { } } else { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This subscriber does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet'), ]); } } @@ -254,7 +253,7 @@ class Subscribers extends APIEndpoint { $segment = $this->getSegment($data); if (!$segment) { return $this->errorResponse([ - APIError::NOT_FOUND => WPFunctions::get()->__('This segment does not exist.', 'mailpoet'), + APIError::NOT_FOUND => __('This segment does not exist.', 'mailpoet'), ]); } } @@ -308,11 +307,11 @@ class Subscribers extends APIEndpoint { private function getErrorMessage(ValidationException $exception): string { $exceptionMessage = $exception->getMessage(); if (strpos($exceptionMessage, 'This value should not be blank.') !== false) { - return WPFunctions::get()->__('Please enter your email address', 'mailpoet'); + return __('Please enter your email address', 'mailpoet'); } elseif (strpos($exceptionMessage, 'This value is not a valid email address.') !== false) { - return WPFunctions::get()->__('Your email address is invalid!', 'mailpoet'); + return __('Your email address is invalid!', 'mailpoet'); } - return WPFunctions::get()->__('Unexpected error.', 'mailpoet'); + return __('Unexpected error.', 'mailpoet'); } } diff --git a/mailpoet/lib/API/JSON/v1/UserFlags.php b/mailpoet/lib/API/JSON/v1/UserFlags.php index 4a799d4a14..a40c63bd31 100644 --- a/mailpoet/lib/API/JSON/v1/UserFlags.php +++ b/mailpoet/lib/API/JSON/v1/UserFlags.php @@ -6,7 +6,6 @@ use MailPoet\API\JSON\Endpoint as APIEndpoint; use MailPoet\API\JSON\Error as APIError; use MailPoet\Config\AccessControl; use MailPoet\Settings\UserFlagsController; -use MailPoet\WP\Functions as WPFunctions; class UserFlags extends APIEndpoint { @@ -28,7 +27,7 @@ class UserFlags extends APIEndpoint { return $this->badRequest( [ APIError::BAD_REQUEST => - WPFunctions::get()->__('You have not specified any user flags to be saved.', 'mailpoet'), + __('You have not specified any user flags to be saved.', 'mailpoet'), ]); } else { foreach ($flags as $name => $value) { diff --git a/mailpoet/lib/API/MP/v1/API.php b/mailpoet/lib/API/MP/v1/API.php index ad99ab62cf..e9ca23847d 100644 --- a/mailpoet/lib/API/MP/v1/API.php +++ b/mailpoet/lib/API/MP/v1/API.php @@ -9,7 +9,6 @@ use MailPoet\Models\SubscriberSegment; use MailPoet\Subscribers\RequiredCustomFieldValidator; use MailPoet\Subscribers\Source; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; /** * API used by other plugins @@ -91,7 +90,7 @@ class API { // throw exception when none of the segments exist $foundSegments = Segment::whereIn('id', $listIds)->findMany(); if (!$foundSegments) { - $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($listIds), 'mailpoet'); + $exception = _n('This list does not exist.', 'These lists do not exist.', count($listIds), 'mailpoet'); throw new APIException($exception, APIException::LIST_NOT_EXISTS); } @@ -111,7 +110,7 @@ class API { if (count($foundSegmentsIds) !== count($listIds)) { $missingIds = array_values(array_diff($listIds, $foundSegmentsIds)); $exception = sprintf( - WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missingIds), 'mailpoet'), + _n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missingIds), 'mailpoet'), implode(', ', $missingIds) ); throw new APIException($exception, APIException::LIST_NOT_EXISTS); diff --git a/mailpoet/lib/API/MP/v1/Subscribers.php b/mailpoet/lib/API/MP/v1/Subscribers.php index 430200293e..6b628126d5 100644 --- a/mailpoet/lib/API/MP/v1/Subscribers.php +++ b/mailpoet/lib/API/MP/v1/Subscribers.php @@ -107,7 +107,7 @@ class Subscribers { // throw exception when none of the segments exist $foundSegments = $this->segmentsRepository->findBy(['id' => $listIds]); if (!$foundSegments) { - $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($listIds), 'mailpoet'); + $exception = _n('This list does not exist.', 'These lists do not exist.', count($listIds), 'mailpoet'); throw new APIException($exception, APIException::LIST_NOT_EXISTS); } @@ -130,7 +130,7 @@ class Subscribers { if (count($foundSegmentsIds) !== count($listIds)) { $missingIds = array_values(array_diff($listIds, $foundSegmentsIds)); $exception = sprintf( - WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missingIds), 'mailpoet'), + _n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missingIds), 'mailpoet'), implode(', ', $missingIds) ); throw new APIException(sprintf($exception, implode(', ', $missingIds)), APIException::LIST_NOT_EXISTS); diff --git a/mailpoet/lib/AdminPages/Pages/Newsletters.php b/mailpoet/lib/AdminPages/Pages/Newsletters.php index 65b50f9e5a..3ff02ed18b 100644 --- a/mailpoet/lib/AdminPages/Pages/Newsletters.php +++ b/mailpoet/lib/AdminPages/Pages/Newsletters.php @@ -136,7 +136,7 @@ class Newsletters { $data['current_wp_user_firstname'] = $this->wp->wpGetCurrentUser()->user_firstname; $data['site_url'] = $this->wp->siteUrl(); $data['roles'] = $wp_roles->get_names(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps - $data['roles']['mailpoet_all'] = $this->wp->__('In any WordPress role', 'mailpoet'); + $data['roles']['mailpoet_all'] = __('In any WordPress role', 'mailpoet'); $installedAtDiff = (new \DateTime($this->settings->get('installed_at')))->diff(new \DateTime()); $data['installed_days_ago'] = (int)$installedAtDiff->format('%a'); diff --git a/mailpoet/lib/AdminPages/Pages/Settings.php b/mailpoet/lib/AdminPages/Pages/Settings.php index 21695a19b5..aa72bac4c8 100644 --- a/mailpoet/lib/AdminPages/Pages/Settings.php +++ b/mailpoet/lib/AdminPages/Pages/Settings.php @@ -104,7 +104,7 @@ class Settings { $data = array_merge($data, Installer::getPremiumStatus()); if (isset($_GET['enable-customizer-notice'])) { - $notice = new WPNotice(WPNotice::TYPE_ERROR, $this->wp->_x( + $notice = new WPNotice(WPNotice::TYPE_ERROR, _x( 'You need to have WooCommerce active to access the MailPoet email customizer for WooCommerce.', 'Notice in Settings when WooCommerce is not enabled' ), 'mailpoet'); diff --git a/mailpoet/lib/AutomaticEmails/WooCommerce/Events/AbandonedCart.php b/mailpoet/lib/AutomaticEmails/WooCommerce/Events/AbandonedCart.php index 62b52d4935..aae6679cae 100644 --- a/mailpoet/lib/AutomaticEmails/WooCommerce/Events/AbandonedCart.php +++ b/mailpoet/lib/AutomaticEmails/WooCommerce/Events/AbandonedCart.php @@ -52,11 +52,11 @@ class AbandonedCart { public function getEventDetails() { return [ 'slug' => self::SLUG, - 'title' => WPFunctions::get()->_x('Abandoned Shopping Cart', 'This is the name of a type of automatic email for ecommerce. Those emails are sent automatically when a customer adds product to his shopping cart but never complete the checkout process.', 'mailpoet'), - 'description' => WPFunctions::get()->__('Send an email to logged-in visitors who have items in their shopping carts but left your website without checking out. Can convert up to 5% of abandoned carts.', 'mailpoet'), - 'listingScheduleDisplayText' => WPFunctions::get()->_x('Email sent when a customer abandons his cart.', 'Description of Abandoned Shopping Cart email', 'mailpoet'), + 'title' => _x('Abandoned Shopping Cart', 'This is the name of a type of automatic email for ecommerce. Those emails are sent automatically when a customer adds product to his shopping cart but never complete the checkout process.', 'mailpoet'), + 'description' => __('Send an email to logged-in visitors who have items in their shopping carts but left your website without checking out. Can convert up to 5% of abandoned carts.', 'mailpoet'), + 'listingScheduleDisplayText' => _x('Email sent when a customer abandons his cart.', 'Description of Abandoned Shopping Cart email', 'mailpoet'), 'badge' => [ - 'text' => WPFunctions::get()->__('Must-have', 'mailpoet'), + 'text' => __('Must-have', 'mailpoet'), 'style' => 'red', ], 'timeDelayValues' => [ diff --git a/mailpoet/lib/AutomaticEmails/WooCommerce/Events/FirstPurchase.php b/mailpoet/lib/AutomaticEmails/WooCommerce/Events/FirstPurchase.php index 3cd94fe628..a17bc31af1 100644 --- a/mailpoet/lib/AutomaticEmails/WooCommerce/Events/FirstPurchase.php +++ b/mailpoet/lib/AutomaticEmails/WooCommerce/Events/FirstPurchase.php @@ -72,20 +72,20 @@ class FirstPurchase { public function getEventDetails() { return [ 'slug' => self::SLUG, - 'title' => WPFunctions::get()->__('First Purchase', 'mailpoet'), - 'description' => WPFunctions::get()->__('Let MailPoet send an email to customers who make their first purchase.', 'mailpoet'), - 'listingScheduleDisplayText' => WPFunctions::get()->__('Email sent when a customer makes their first purchase.', 'mailpoet'), + 'title' => __('First Purchase', 'mailpoet'), + 'description' => __('Let MailPoet send an email to customers who make their first purchase.', 'mailpoet'), + 'listingScheduleDisplayText' => __('Email sent when a customer makes their first purchase.', 'mailpoet'), 'badge' => [ - 'text' => WPFunctions::get()->__('Must-have', 'mailpoet'), + 'text' => __('Must-have', 'mailpoet'), 'style' => 'red', ], 'shortcodes' => [ [ - 'text' => WPFunctions::get()->__('Order amount', 'mailpoet'), + 'text' => __('Order amount', 'mailpoet'), 'shortcode' => self::ORDER_TOTAL_SHORTCODE, ], [ - 'text' => WPFunctions::get()->__('Order date', 'mailpoet'), + 'text' => __('Order date', 'mailpoet'), 'shortcode' => self::ORDER_DATE_SHORTCODE, ], ], diff --git a/mailpoet/lib/AutomaticEmails/WooCommerce/Events/PurchasedProduct.php b/mailpoet/lib/AutomaticEmails/WooCommerce/Events/PurchasedProduct.php index 7a1073b364..e64fcc4345 100644 --- a/mailpoet/lib/AutomaticEmails/WooCommerce/Events/PurchasedProduct.php +++ b/mailpoet/lib/AutomaticEmails/WooCommerce/Events/PurchasedProduct.php @@ -70,10 +70,10 @@ class PurchasedProduct { public function getEventDetails() { return [ 'slug' => self::SLUG, - 'title' => WPFunctions::get()->__('Purchased This Product', 'mailpoet'), - 'description' => WPFunctions::get()->__('Let MailPoet send an email to customers who purchase a specific product for the first time.', 'mailpoet'), - 'listingScheduleDisplayText' => WPFunctions::get()->__('Email sent when a customer buys product: %s', 'mailpoet'), - 'listingScheduleDisplayTextPlural' => WPFunctions::get()->__('Email sent when a customer buys products: %s', 'mailpoet'), + 'title' => __('Purchased This Product', 'mailpoet'), + 'description' => __('Let MailPoet send an email to customers who purchase a specific product for the first time.', 'mailpoet'), + 'listingScheduleDisplayText' => __('Email sent when a customer buys product: %s', 'mailpoet'), + 'listingScheduleDisplayTextPlural' => __('Email sent when a customer buys products: %s', 'mailpoet'), 'options' => [ 'multiple' => true, 'endpoint' => 'products', diff --git a/mailpoet/lib/AutomaticEmails/WooCommerce/WooCommerce.php b/mailpoet/lib/AutomaticEmails/WooCommerce/WooCommerce.php index 3562364dd3..1b3f63f1db 100644 --- a/mailpoet/lib/AutomaticEmails/WooCommerce/WooCommerce.php +++ b/mailpoet/lib/AutomaticEmails/WooCommerce/WooCommerce.php @@ -62,15 +62,15 @@ class WooCommerce { public function setupGroup() { return [ 'slug' => self::SLUG, - 'title' => WPFunctions::get()->__('WooCommerce', 'mailpoet'), - 'description' => WPFunctions::get()->__('Automatically send an email based on your customers’ purchase behavior. Enhance your customer service and start increasing sales with WooCommerce follow up emails.', 'mailpoet'), + 'title' => __('WooCommerce', 'mailpoet'), + 'description' => __('Automatically send an email based on your customers’ purchase behavior. Enhance your customer service and start increasing sales with WooCommerce follow up emails.', 'mailpoet'), 'events' => $this->wp->applyFilters(self::EVENTS_FILTER, []), ]; } public function setupEvents($events) { $customEventDetails = (!$this->woocommerceEnabled) ? [ - 'actionButtonTitle' => WPFunctions::get()->__('WooCommerce is required', 'mailpoet'), + 'actionButtonTitle' => __('WooCommerce is required', 'mailpoet'), 'actionButtonLink' => 'https://wordpress.org/plugins/woocommerce/', ] : []; @@ -110,7 +110,7 @@ class WooCommerce { private function displayEventWarning($event) { $notice = sprintf('%s %s', sprintf(__('WooCommerce %s event is misconfigured.', 'mailpoet'), $event), - WPFunctions::get()->__('Please contact our technical support for assistance.', 'mailpoet') + __('Please contact our technical support for assistance.', 'mailpoet') ); Notice::displayWarning($notice); } diff --git a/mailpoet/lib/Config/AccessControl.php b/mailpoet/lib/Config/AccessControl.php index f1e13ae290..441a4a504c 100644 --- a/mailpoet/lib/Config/AccessControl.php +++ b/mailpoet/lib/Config/AccessControl.php @@ -74,14 +74,14 @@ class AccessControl { public function getPermissionLabels() { return [ - self::PERMISSION_ACCESS_PLUGIN_ADMIN => WPFunctions::get()->__('Admin menu item', 'mailpoet'), - self::PERMISSION_MANAGE_SETTINGS => WPFunctions::get()->__('Manage settings', 'mailpoet'), - self::PERMISSION_MANAGE_FEATURES => WPFunctions::get()->__('Manage features', 'mailpoet'), - self::PERMISSION_MANAGE_EMAILS => WPFunctions::get()->__('Manage emails', 'mailpoet'), - self::PERMISSION_MANAGE_SUBSCRIBERS => WPFunctions::get()->__('Manage subscribers', 'mailpoet'), - self::PERMISSION_MANAGE_FORMS => WPFunctions::get()->__('Manage forms', 'mailpoet'), - self::PERMISSION_MANAGE_SEGMENTS => WPFunctions::get()->__('Manage segments', 'mailpoet'), - self::PERMISSION_MANAGE_AUTOMATIONS => WPFunctions::get()->__('Manage automations', 'mailpoet'), + self::PERMISSION_ACCESS_PLUGIN_ADMIN => __('Admin menu item', 'mailpoet'), + self::PERMISSION_MANAGE_SETTINGS => __('Manage settings', 'mailpoet'), + self::PERMISSION_MANAGE_FEATURES => __('Manage features', 'mailpoet'), + self::PERMISSION_MANAGE_EMAILS => __('Manage emails', 'mailpoet'), + self::PERMISSION_MANAGE_SUBSCRIBERS => __('Manage subscribers', 'mailpoet'), + self::PERMISSION_MANAGE_FORMS => __('Manage forms', 'mailpoet'), + self::PERMISSION_MANAGE_SEGMENTS => __('Manage segments', 'mailpoet'), + self::PERMISSION_MANAGE_AUTOMATIONS => __('Manage automations', 'mailpoet'), ]; } diff --git a/mailpoet/lib/Config/Capabilities.php b/mailpoet/lib/Config/Capabilities.php index b05f7be9fd..57e26bbe86 100644 --- a/mailpoet/lib/Config/Capabilities.php +++ b/mailpoet/lib/Config/Capabilities.php @@ -77,7 +77,7 @@ class Capabilities { members_register_cap_group( self::MEMBERS_CAP_GROUP_NAME, [ - 'label' => WPFunctions::get()->__('MailPoet', 'mailpoet'), + 'label' => __('MailPoet', 'mailpoet'), 'caps' => [], 'icon' => 'mailpoet-icon-logo', 'priority' => 30, diff --git a/mailpoet/lib/Config/Hooks.php b/mailpoet/lib/Config/Hooks.php index 3222a7b651..8383811828 100644 --- a/mailpoet/lib/Config/Hooks.php +++ b/mailpoet/lib/Config/Hooks.php @@ -374,7 +374,7 @@ class Hooks { public function appendImageSize($sizes) { return array_merge($sizes, [ - 'mailpoet_newsletter_max' => WPFunctions::get()->__('MailPoet Newsletter', 'mailpoet'), + 'mailpoet_newsletter_max' => __('MailPoet Newsletter', 'mailpoet'), ]); } diff --git a/mailpoet/lib/Config/MP2Migrator.php b/mailpoet/lib/Config/MP2Migrator.php index 8c5c31dd17..dcf133d82d 100644 --- a/mailpoet/lib/Config/MP2Migrator.php +++ b/mailpoet/lib/Config/MP2Migrator.php @@ -302,7 +302,7 @@ class MP2Migrator { $this->progressbar->setTotalCount(0); - $result .= WPFunctions::get()->__('MailPoet 2 data found:', 'mailpoet') . "\n"; + $result .= __('MailPoet 2 data found:', 'mailpoet') . "\n"; // User Lists $usersListsCount = ORM::for_table($this->mp2ListTable)->count(); diff --git a/mailpoet/lib/Config/Menu.php b/mailpoet/lib/Config/Menu.php index 88d25fb708..986fa363e9 100644 --- a/mailpoet/lib/Config/Menu.php +++ b/mailpoet/lib/Config/Menu.php @@ -146,7 +146,7 @@ class Menu { $newslettersPage = $this->wp->addSubmenuPage( self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Emails', 'mailpoet')), - $this->wp->__('Emails', 'mailpoet'), + __('Emails', 'mailpoet'), AccessControl::PERMISSION_MANAGE_EMAILS, self::MAIN_PAGE_SLUG, [ @@ -158,7 +158,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $newslettersPage, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->_x( + 'label' => _x( 'Number of newsletters per page', 'newsletters per page (screen options)', 'mailpoet' @@ -171,7 +171,7 @@ class Menu { $this->wp->addSubmenuPage( true, $this->setPageTitle(__('Newsletter', 'mailpoet')), - $this->wp->__('Newsletter Editor', 'mailpoet'), + __('Newsletter Editor', 'mailpoet'), AccessControl::PERMISSION_MANAGE_EMAILS, 'mailpoet-newsletter-editor', [ @@ -184,7 +184,7 @@ class Menu { $formsPage = $this->wp->addSubmenuPage( self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Forms', 'mailpoet')), - $this->wp->__('Forms', 'mailpoet'), + __('Forms', 'mailpoet'), AccessControl::PERMISSION_MANAGE_FORMS, 'mailpoet-forms', [ @@ -196,7 +196,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $formsPage, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->_x( + 'label' => _x( 'Number of forms per page', 'forms per page (screen options)', 'mailpoet' @@ -209,7 +209,7 @@ class Menu { $formEditorPage = $this->wp->addSubmenuPage( true, $this->setPageTitle(__('Form Editor', 'mailpoet')), - $this->wp->__('Form Editor', 'mailpoet'), + __('Form Editor', 'mailpoet'), AccessControl::PERMISSION_MANAGE_FORMS, 'mailpoet-form-editor', [ @@ -229,7 +229,7 @@ class Menu { $formTemplateSelectionEditorPage = $this->wp->addSubmenuPage( true, $this->setPageTitle(__('Select Form Template', 'mailpoet')), - $this->wp->__('Select Form Template', 'mailpoet'), + __('Select Form Template', 'mailpoet'), AccessControl::PERMISSION_MANAGE_FORMS, 'mailpoet-form-editor-template-selection', [ @@ -250,7 +250,7 @@ class Menu { $subscribersPage = $this->wp->addSubmenuPage( self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Subscribers', 'mailpoet')), - $this->wp->__('Subscribers', 'mailpoet'), + __('Subscribers', 'mailpoet'), AccessControl::PERMISSION_MANAGE_SUBSCRIBERS, 'mailpoet-subscribers', [ @@ -262,7 +262,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $subscribersPage, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->_x( + 'label' => _x( 'Number of subscribers per page', 'subscribers per page (screen options)', 'mailpoet' @@ -275,7 +275,7 @@ class Menu { $this->wp->addSubmenuPage( 'admin.php?page=mailpoet-subscribers', $this->setPageTitle(__('Import', 'mailpoet')), - $this->wp->__('Import', 'mailpoet'), + __('Import', 'mailpoet'), AccessControl::PERMISSION_MANAGE_SUBSCRIBERS, 'mailpoet-import', [ @@ -288,7 +288,7 @@ class Menu { $this->wp->addSubmenuPage( true, $this->setPageTitle(__('Export', 'mailpoet')), - $this->wp->__('Export', 'mailpoet'), + __('Export', 'mailpoet'), AccessControl::PERMISSION_MANAGE_SUBSCRIBERS, 'mailpoet-export', [ @@ -301,7 +301,7 @@ class Menu { $segmentsPage = $this->wp->addSubmenuPage( self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Lists', 'mailpoet')), - $this->wp->__('Lists', 'mailpoet'), + __('Lists', 'mailpoet'), AccessControl::PERMISSION_MANAGE_SEGMENTS, 'mailpoet-segments', [ @@ -313,7 +313,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $segmentsPage, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->_x( + 'label' => _x( 'Number of segments per page', 'segments per page (screen options)', 'mailpoet' @@ -326,7 +326,7 @@ class Menu { $this->wp->addSubmenuPage( self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Settings', 'mailpoet')), - $this->wp->__('Settings', 'mailpoet'), + __('Settings', 'mailpoet'), AccessControl::PERMISSION_MANAGE_SETTINGS, 'mailpoet-settings', [ @@ -339,7 +339,7 @@ class Menu { $this->wp->addSubmenuPage( self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Help', 'mailpoet')), - $this->wp->__('Help', 'mailpoet'), + __('Help', 'mailpoet'), AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN, 'mailpoet-help', [ @@ -353,7 +353,7 @@ class Menu { $this->wp->addSubmenuPage( License::getLicense() ? true : self::MAIN_PAGE_SLUG, $this->setPageTitle(__('Upgrade', 'mailpoet')), - $this->wp->__('Upgrade', 'mailpoet'), + __('Upgrade', 'mailpoet'), AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN, 'mailpoet-upgrade', [ @@ -366,7 +366,7 @@ class Menu { $this->wp->addSubmenuPage( true, $this->setPageTitle(__('Welcome Wizard', 'mailpoet')), - $this->wp->__('Welcome Wizard', 'mailpoet'), + __('Welcome Wizard', 'mailpoet'), AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN, 'mailpoet-welcome-wizard', [ @@ -378,8 +378,8 @@ class Menu { // WooCommerce Setup $this->wp->addSubmenuPage( true, - $this->setPageTitle($this->wp->__('WooCommerce Setup', 'mailpoet')), - $this->wp->__('WooCommerce Setup', 'mailpoet'), + $this->setPageTitle(__('WooCommerce Setup', 'mailpoet')), + __('WooCommerce Setup', 'mailpoet'), AccessControl::PERMISSION_ACCESS_PLUGIN_ADMIN, 'mailpoet-woocommerce-setup', [ @@ -535,7 +535,7 @@ class Menu { public function setPageTitle($title) { return sprintf( '%s - %s', - $this->wp->__('MailPoet', 'mailpoet'), + __('MailPoet', 'mailpoet'), $title ); } diff --git a/mailpoet/lib/Config/PersonalDataErasers.php b/mailpoet/lib/Config/PersonalDataErasers.php index 0fd005bfb6..4a2c3143e0 100644 --- a/mailpoet/lib/Config/PersonalDataErasers.php +++ b/mailpoet/lib/Config/PersonalDataErasers.php @@ -13,7 +13,7 @@ class PersonalDataErasers { public function registerSubscriberEraser($erasers) { $erasers['mailpet-subscriber'] = [ - 'eraser_friendly_name' => WPFunctions::get()->__('MailPoet Subscribers', 'mailpoet'), + 'eraser_friendly_name' => __('MailPoet Subscribers', 'mailpoet'), 'callback' => [ContainerWrapper::getInstance()->get(SubscriberPersonalDataEraser::class), 'erase'], ]; diff --git a/mailpoet/lib/Config/PersonalDataExporters.php b/mailpoet/lib/Config/PersonalDataExporters.php index 44039592b3..b4b0c8e26e 100644 --- a/mailpoet/lib/Config/PersonalDataExporters.php +++ b/mailpoet/lib/Config/PersonalDataExporters.php @@ -21,7 +21,7 @@ class PersonalDataExporters { * @var CustomFieldsRepository */ private $customFieldsRepository; - + public function __construct( SubscribersRepository $subscribersRepository, CustomFieldsRepository $customFieldsRepository @@ -40,7 +40,7 @@ class PersonalDataExporters { public function registerSegmentsExporter($exporters) { $exporters[] = [ - 'exporter_friendly_name' => WPFunctions::get()->__('MailPoet Lists', 'mailpoet'), + 'exporter_friendly_name' => __('MailPoet Lists', 'mailpoet'), 'callback' => [new SegmentsExporter($this->subscribersRepository), 'export'], ]; return $exporters; @@ -48,7 +48,7 @@ class PersonalDataExporters { public function registerSubscriberExporter($exporters) { $exporters[] = [ - 'exporter_friendly_name' => WPFunctions::get()->__('MailPoet Subscriber Data', 'mailpoet'), + 'exporter_friendly_name' => __('MailPoet Subscriber Data', 'mailpoet'), 'callback' => [new SubscriberExporter($this->subscribersRepository, $this->customFieldsRepository), 'export'], ]; return $exporters; @@ -57,7 +57,7 @@ class PersonalDataExporters { public function registerNewslettersExporter($exporters) { $newsletterExporter = ContainerWrapper::getInstance()->get(NewslettersExporter::class); $exporters[] = [ - 'exporter_friendly_name' => WPFunctions::get()->__('MailPoet Emails', 'mailpoet'), + 'exporter_friendly_name' => __('MailPoet Emails', 'mailpoet'), 'callback' => [$newsletterExporter, 'export'], ]; return $exporters; @@ -65,7 +65,7 @@ class PersonalDataExporters { public function registerNewsletterClicksExporter($exporters) { $exporters[] = [ - 'exporter_friendly_name' => WPFunctions::get()->__('MailPoet Email Clicks', 'mailpoet'), + 'exporter_friendly_name' => __('MailPoet Email Clicks', 'mailpoet'), 'callback' => [ContainerWrapper::getInstance()->get(NewsletterClicksExporter::class), 'export'], ]; return $exporters; @@ -73,7 +73,7 @@ class PersonalDataExporters { public function registerNewsletterOpensExporter($exporters) { $exporters[] = [ - 'exporter_friendly_name' => WPFunctions::get()->__('MailPoet Email Opens', 'mailpoet'), + 'exporter_friendly_name' => __('MailPoet Email Opens', 'mailpoet'), 'callback' => [ContainerWrapper::getInstance()->get(NewsletterOpensExporter::class), 'export'], ]; return $exporters; diff --git a/mailpoet/lib/Config/Populator.php b/mailpoet/lib/Config/Populator.php index 5a39b133c8..740cc2e750 100644 --- a/mailpoet/lib/Config/Populator.php +++ b/mailpoet/lib/Config/Populator.php @@ -306,8 +306,8 @@ class Populator { } $woocommerceOptinOnCheckout = $this->settings->fetch('woocommerce.optin_on_checkout'); - $legacyLabelText = $this->wp->_x('Yes, I would like to be added to your mailing list', "default email opt-in message displayed on checkout page for ecommerce websites", 'mailpoet'); - $currentLabelText = $this->wp->_x('I would like to receive exclusive emails with discounts and product information', "default email opt-in message displayed on checkout page for ecommerce websites", 'mailpoet'); + $legacyLabelText = _x('Yes, I would like to be added to your mailing list', "default email opt-in message displayed on checkout page for ecommerce websites", 'mailpoet'); + $currentLabelText = _x('I would like to receive exclusive emails with discounts and product information', "default email opt-in message displayed on checkout page for ecommerce websites", 'mailpoet'); if (empty($woocommerceOptinOnCheckout)) { $this->settings->set('woocommerce.optin_on_checkout', [ 'enabled' => empty($settingsDbVersion), // enable on new installs only @@ -371,9 +371,9 @@ class Populator { if (!$defaultSegment instanceof Segment) { $defaultSegment = Segment::create(); $newList = [ - 'name' => $this->wp->__('Newsletter mailing list', 'mailpoet'), + 'name' => __('Newsletter mailing list', 'mailpoet'), 'description' => - $this->wp->__('This list is automatically created when you install MailPoet.', 'mailpoet'), + __('This list is automatically created when you install MailPoet.', 'mailpoet'), ]; $defaultSegment->hydrate($newList); $defaultSegment->save(); diff --git a/mailpoet/lib/Config/PopulatorData/Templates/AppWelcome.php b/mailpoet/lib/Config/PopulatorData/Templates/AppWelcome.php index 466eb18ba4..a5928af92e 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/AppWelcome.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/AppWelcome.php @@ -16,7 +16,7 @@ class AppWelcome { public function get() { return [ - 'name' => WPFunctions::get()->__("App Welcome", 'mailpoet'), + 'name' => __("App Welcome", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -316,7 +316,7 @@ class AppWelcome {

Address Line 1

Address Line 2

City

-

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', +

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', ], [ 'type' => 'social', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Avocado.php b/mailpoet/lib/Config/PopulatorData/Templates/Avocado.php index b4b0bf98cf..20d7fe7316 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Avocado.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Avocado.php @@ -16,7 +16,7 @@ class Avocado { public function get() { return [ - 'name' => WPFunctions::get()->__("Avocado", 'mailpoet'), + 'name' => __("Avocado", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -640,7 +640,7 @@ class Avocado { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -873,7 +873,7 @@ class Avocado { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1009,7 +1009,7 @@ class Avocado { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Birds.php b/mailpoet/lib/Config/PopulatorData/Templates/Birds.php index 3af7c5f082..cf029aff1d 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Birds.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Birds.php @@ -206,7 +206,7 @@ class Birds { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1346,7 +1346,7 @@ class Birds { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1580,7 +1580,7 @@ class Birds { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1727,7 +1727,7 @@ class Birds { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/BookStoreWithCoupon.php b/mailpoet/lib/Config/PopulatorData/Templates/BookStoreWithCoupon.php index 8e5afaed44..3df4f58b01 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/BookStoreWithCoupon.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/BookStoreWithCoupon.php @@ -16,7 +16,7 @@ class BookStoreWithCoupon { public function get() { return [ - 'name' => WPFunctions::get()->__("Book store (with coupon)", 'mailpoet'), + 'name' => __("Book store (with coupon)", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -798,7 +798,7 @@ class BookStoreWithCoupon { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -822,7 +822,7 @@ class BookStoreWithCoupon { 2 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1056,7 +1056,7 @@ class BookStoreWithCoupon { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1173,7 +1173,7 @@ class BookStoreWithCoupon { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/BrandingAgencyNews.php b/mailpoet/lib/Config/PopulatorData/Templates/BrandingAgencyNews.php index c5249abb20..d7be2ddcd3 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/BrandingAgencyNews.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/BrandingAgencyNews.php @@ -15,7 +15,7 @@ class BrandingAgencyNews { public function get() { return [ - 'name' => WPFunctions::get()->__("Branding Agency News", 'mailpoet'), + 'name' => __("Branding Agency News", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -101,7 +101,7 @@ class BrandingAgencyNews { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1684,7 +1684,7 @@ class BrandingAgencyNews { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1930,7 +1930,7 @@ class BrandingAgencyNews { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -2067,7 +2067,7 @@ class BrandingAgencyNews { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/BuddhistTemple.php b/mailpoet/lib/Config/PopulatorData/Templates/BuddhistTemple.php index 37544a31cd..182221493f 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/BuddhistTemple.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/BuddhistTemple.php @@ -156,7 +156,7 @@ class BuddhistTemple { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -893,7 +893,7 @@ class BuddhistTemple { 4 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1127,7 +1127,7 @@ class BuddhistTemple { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1274,7 +1274,7 @@ class BuddhistTemple { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Charity.php b/mailpoet/lib/Config/PopulatorData/Templates/Charity.php index a3ba359c99..35c6969b89 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Charity.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Charity.php @@ -16,7 +16,7 @@ class Charity { public function get() { return [ - 'name' => WPFunctions::get()->__("Charity", 'mailpoet'), + 'name' => __("Charity", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -771,7 +771,7 @@ class Charity { 1 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', ], ], ], @@ -984,7 +984,7 @@ class Charity { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1109,7 +1109,7 @@ class Charity { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/CityLocalNews.php b/mailpoet/lib/Config/PopulatorData/Templates/CityLocalNews.php index 7054ade38c..64e2415f7b 100755 --- a/mailpoet/lib/Config/PopulatorData/Templates/CityLocalNews.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/CityLocalNews.php @@ -16,7 +16,7 @@ class CityLocalNews { public function get() { return [ - 'name' => WPFunctions::get()->__("City News", 'mailpoet'), + 'name' => __("City News", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -102,7 +102,7 @@ class CityLocalNews { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1038,7 +1038,7 @@ class CityLocalNews { 3 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1320,7 +1320,7 @@ class CityLocalNews { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1475,7 +1475,7 @@ class CityLocalNews { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/ClearNews.php b/mailpoet/lib/Config/PopulatorData/Templates/ClearNews.php index c8475aaff0..b2028e47e6 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/ClearNews.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/ClearNews.php @@ -16,7 +16,7 @@ class ClearNews { public function get() { return [ - 'name' => WPFunctions::get()->__("Clear News", 'mailpoet'), + 'name' => __("Clear News", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -102,7 +102,7 @@ class ClearNews { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1421,8 +1421,8 @@ class ClearNews { 0 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

-

'.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').'

+

'.__("Manage your subscription", 'mailpoet').'

', ], 1 => [ @@ -1715,7 +1715,7 @@ class ClearNews { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1860,7 +1860,7 @@ class ClearNews { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Coffee.php b/mailpoet/lib/Config/PopulatorData/Templates/Coffee.php index e7edc786c9..2a29c17922 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Coffee.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Coffee.php @@ -16,7 +16,7 @@ class Coffee { public function get() { return [ - 'name' => WPFunctions::get()->__("Coffee", 'mailpoet'), + 'name' => __("Coffee", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -223,7 +223,7 @@ class Coffee { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -931,7 +931,7 @@ class Coffee { 3 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/College.php b/mailpoet/lib/Config/PopulatorData/Templates/College.php index 2d3042cf8a..c94d0295a2 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/College.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/College.php @@ -16,7 +16,7 @@ class College { public function get() { return [ - 'name' => WPFunctions::get()->__("College", 'mailpoet'), + 'name' => __("College", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -275,7 +275,7 @@ class College { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -709,7 +709,7 @@ class College { 2 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', ], ], ], @@ -973,7 +973,7 @@ class College { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1119,7 +1119,7 @@ class College { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/ComputerRepair.php b/mailpoet/lib/Config/PopulatorData/Templates/ComputerRepair.php index 1565cf0449..3e67e8e32e 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/ComputerRepair.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/ComputerRepair.php @@ -16,7 +16,7 @@ class ComputerRepair { public function get() { return [ - 'name' => WPFunctions::get()->__("Computer Repair", 'mailpoet'), + 'name' => __("Computer Repair", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -102,7 +102,7 @@ class ComputerRepair { 1 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', ], ], ], @@ -602,7 +602,7 @@ class ComputerRepair { 1 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '

', ], ], ], @@ -955,7 +955,7 @@ class ComputerRepair { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1112,7 +1112,7 @@ class ComputerRepair { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/DogFood.php b/mailpoet/lib/Config/PopulatorData/Templates/DogFood.php index 1b9ac31b3d..d03ffe4fce 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/DogFood.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/DogFood.php @@ -16,7 +16,7 @@ class DogFood { public function get() { return [ - 'name' => WPFunctions::get()->__("Dog Food", 'mailpoet'), + 'name' => __("Dog Food", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -755,7 +755,7 @@ class DogFood { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -987,7 +987,7 @@ class DogFood { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1123,7 +1123,7 @@ class DogFood { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Drone.php b/mailpoet/lib/Config/PopulatorData/Templates/Drone.php index e67180bd86..588c3ea71a 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Drone.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Drone.php @@ -16,7 +16,7 @@ class Drone { public function get() { return [ - 'name' => WPFunctions::get()->__("Drone", 'mailpoet'), + 'name' => __("Drone", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -809,7 +809,7 @@ class Drone { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1041,7 +1041,7 @@ class Drone { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1166,7 +1166,7 @@ class Drone { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Engineering.php b/mailpoet/lib/Config/PopulatorData/Templates/Engineering.php index 8445e7bc02..e862b15964 100755 --- a/mailpoet/lib/Config/PopulatorData/Templates/Engineering.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Engineering.php @@ -15,7 +15,7 @@ class Engineering { public function get() { return [ - 'name' => WPFunctions::get()->__("Engineering", 'mailpoet'), + 'name' => __("Engineering", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -160,7 +160,7 @@ class Engineering { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -819,8 +819,8 @@ class Engineering { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

-

'.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').'

+

'.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1108,7 +1108,7 @@ class Engineering { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1245,7 +1245,7 @@ class Engineering { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Faith.php b/mailpoet/lib/Config/PopulatorData/Templates/Faith.php index 60f3efb2a0..6f9279acc1 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Faith.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Faith.php @@ -16,7 +16,7 @@ class Faith { public function get() { return [ - 'name' => WPFunctions::get()->__("Faith", 'mailpoet'), + 'name' => __("Faith", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -350,7 +350,7 @@ class Faith { 'blocks' => [ 0 => [ 'type' => 'footer', - 'text' => ''.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'', + 'text' => ''.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'', 'styles' => [ 'block' => [ 'backgroundColor' => '#e7eff6', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FarmersMarket.php b/mailpoet/lib/Config/PopulatorData/Templates/FarmersMarket.php index 48c64c401d..e2e484e330 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FarmersMarket.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FarmersMarket.php @@ -15,7 +15,7 @@ class FarmersMarket { public function get() { return [ - 'name' => WPFunctions::get()->__("Farmers Market", 'mailpoet'), + 'name' => __("Farmers Market", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -101,7 +101,7 @@ class FarmersMarket { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1100,7 +1100,7 @@ class FarmersMarket { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1393,7 +1393,7 @@ class FarmersMarket { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1530,7 +1530,7 @@ class FarmersMarket { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FashionBlog.php b/mailpoet/lib/Config/PopulatorData/Templates/FashionBlog.php index bf8ee4dca6..7bf74ed9d4 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FashionBlog.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FashionBlog.php @@ -102,7 +102,7 @@ class FashionBlog { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -653,7 +653,7 @@ class FashionBlog { 3 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -940,7 +940,7 @@ class FashionBlog { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1077,7 +1077,7 @@ class FashionBlog { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FashionBlogA.php b/mailpoet/lib/Config/PopulatorData/Templates/FashionBlogA.php index 2323cb73dd..32377de5a0 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FashionBlogA.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FashionBlogA.php @@ -16,7 +16,7 @@ class FashionBlogA { public function get() { return [ - 'name' => WPFunctions::get()->__("Women Fashion Store", 'mailpoet'), + 'name' => __("Women Fashion Store", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -170,7 +170,7 @@ class FashionBlogA { 0 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', ], ], ], @@ -1042,7 +1042,7 @@ class FashionBlogA { 0 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1275,7 +1275,7 @@ class FashionBlogA { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1420,7 +1420,7 @@ class FashionBlogA { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FashionShop.php b/mailpoet/lib/Config/PopulatorData/Templates/FashionShop.php index 874c27b2e7..c73b76eed8 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FashionShop.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FashionShop.php @@ -16,7 +16,7 @@ class FashionShop { public function get() { return [ - 'name' => WPFunctions::get()->__("Kids Shop", 'mailpoet'), + 'name' => __("Kids Shop", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -102,7 +102,7 @@ class FashionShop { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -636,7 +636,7 @@ class FashionShop { 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -868,7 +868,7 @@ class FashionShop { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1015,7 +1015,7 @@ class FashionShop { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FashionStore.php b/mailpoet/lib/Config/PopulatorData/Templates/FashionStore.php index da799f1b7a..44f674eec3 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FashionStore.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FashionStore.php @@ -16,7 +16,7 @@ class FashionStore { public function get() { return [ - 'name' => WPFunctions::get()->__("Fashion Store", 'mailpoet'), + 'name' => __("Fashion Store", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -1061,7 +1061,7 @@ class FashionStore { 1 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', ], ], ], @@ -1274,7 +1274,7 @@ class FashionStore { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1399,7 +1399,7 @@ class FashionStore { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FestivalEvent.php b/mailpoet/lib/Config/PopulatorData/Templates/FestivalEvent.php index 3e0e7fe771..fe5d5e1005 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FestivalEvent.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FestivalEvent.php @@ -16,7 +16,7 @@ class FestivalEvent { public function get() { return [ - 'name' => WPFunctions::get()->__("Festival Event", 'mailpoet'), + 'name' => __("Festival Event", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -461,7 +461,7 @@ class FestivalEvent { ], 2 => [ 'type' => 'footer', - 'text' => '

Mauris tristique ultricies ullamcorper.
Don\'t want to hear from us? '.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

Add your postal address here. 

', + 'text' => '

Mauris tristique ultricies ullamcorper.
Don\'t want to hear from us? '.__("Unsubscribe", 'mailpoet').'

Add your postal address here. 

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Fitness.php b/mailpoet/lib/Config/PopulatorData/Templates/Fitness.php index 3365eaec0a..180e21206b 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Fitness.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Fitness.php @@ -16,7 +16,7 @@ class Fitness { public function get() { return [ - 'name' => WPFunctions::get()->__("Abandoned Cart – Fitness", 'mailpoet'), + 'name' => __("Abandoned Cart – Fitness", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -704,7 +704,7 @@ class Fitness { [ 'type' => 'text', 'text' => '

Address Line 1, Address Line 2, City, Country

-

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', +

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', ], 4 => [ @@ -978,7 +978,7 @@ class Fitness { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1161,7 +1161,7 @@ class Fitness { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FlowersWithCoupon.php b/mailpoet/lib/Config/PopulatorData/Templates/FlowersWithCoupon.php index f9daaab048..7d647a3659 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FlowersWithCoupon.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FlowersWithCoupon.php @@ -16,7 +16,7 @@ class FlowersWithCoupon { public function get() { return [ - 'name' => WPFunctions::get()->__("Flowers (with coupon)", 'mailpoet'), + 'name' => __("Flowers (with coupon)", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -1118,7 +1118,7 @@ class FlowersWithCoupon { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1351,7 +1351,7 @@ class FlowersWithCoupon { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1488,7 +1488,7 @@ class FlowersWithCoupon { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/FoodBox.php b/mailpoet/lib/Config/PopulatorData/Templates/FoodBox.php index ad26960340..6af9a1aaa9 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/FoodBox.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/FoodBox.php @@ -16,7 +16,7 @@ class FoodBox { public function get() { return [ - 'name' => WPFunctions::get()->__("Welcome to FoodBox", 'mailpoet'), + 'name' => __("Welcome to FoodBox", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -684,7 +684,7 @@ class FoodBox { ], 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/GiftWelcome.php b/mailpoet/lib/Config/PopulatorData/Templates/GiftWelcome.php index 5f885e256d..f0db2bf014 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/GiftWelcome.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/GiftWelcome.php @@ -16,7 +16,7 @@ class GiftWelcome { public function get() { return [ - 'name' => WPFunctions::get()->__("Gift Welcome", 'mailpoet'), + 'name' => __("Gift Welcome", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -295,7 +295,7 @@ class GiftWelcome { 5 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', ], ], ], diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Guitarist.php b/mailpoet/lib/Config/PopulatorData/Templates/Guitarist.php index e57a5dc57e..1325505bb7 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Guitarist.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Guitarist.php @@ -284,7 +284,7 @@ class Guitarist { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1335,7 +1335,7 @@ class Guitarist { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1581,7 +1581,7 @@ class Guitarist { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1718,7 +1718,7 @@ class Guitarist { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/HealthyFoodBlog.php b/mailpoet/lib/Config/PopulatorData/Templates/HealthyFoodBlog.php index d4a5a6a5a0..7fa30e7c5f 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/HealthyFoodBlog.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/HealthyFoodBlog.php @@ -15,7 +15,7 @@ class HealthyFoodBlog { public function get() { return [ - 'name' => WPFunctions::get()->__("Healthy Food Blog", 'mailpoet'), + 'name' => __("Healthy Food Blog", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -2065,7 +2065,7 @@ class HealthyFoodBlog { 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -2299,7 +2299,7 @@ class HealthyFoodBlog { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -2446,7 +2446,7 @@ class HealthyFoodBlog { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Hotels.php b/mailpoet/lib/Config/PopulatorData/Templates/Hotels.php index 024f1ea265..dd13ca249c 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Hotels.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Hotels.php @@ -16,7 +16,7 @@ class Hotels { public function get() { return [ - 'name' => WPFunctions::get()->__("Hotels", 'mailpoet'), + 'name' => __("Hotels", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -1029,7 +1029,7 @@ class Hotels { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1262,7 +1262,7 @@ class Hotels { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1387,7 +1387,7 @@ class Hotels { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/IndustryConference.php b/mailpoet/lib/Config/PopulatorData/Templates/IndustryConference.php index 7d6a2366b4..83d05b834d 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/IndustryConference.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/IndustryConference.php @@ -16,7 +16,7 @@ class IndustryConference { public function get() { return [ - 'name' => WPFunctions::get()->__("Industry Conference", 'mailpoet'), + 'name' => __("Industry Conference", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -1039,7 +1039,7 @@ class IndustryConference { 3 => [ 'type' => 'header', - 'text' => '

 '.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

 '.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1063,7 +1063,7 @@ class IndustryConference { 4 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1303,7 +1303,7 @@ class IndustryConference { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1450,7 +1450,7 @@ class IndustryConference { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/JazzClub.php b/mailpoet/lib/Config/PopulatorData/Templates/JazzClub.php index 951d34fbc1..f4accef343 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/JazzClub.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/JazzClub.php @@ -102,7 +102,7 @@ class JazzClub { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -850,7 +850,7 @@ class JazzClub { 2 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1090,7 +1090,7 @@ class JazzClub { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1245,7 +1245,7 @@ class JazzClub { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/KidsClothing.php b/mailpoet/lib/Config/PopulatorData/Templates/KidsClothing.php index 52089f6f6f..7ecd931031 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/KidsClothing.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/KidsClothing.php @@ -16,7 +16,7 @@ class KidsClothing { public function get() { return [ - 'name' => WPFunctions::get()->__("Abandoned Cart – Kids", 'mailpoet'), + 'name' => __("Abandoned Cart – Kids", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), diff --git a/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogA.php b/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogA.php index 700c52d144..3a86358af9 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogA.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogA.php @@ -16,7 +16,7 @@ class LifestyleBlogA { public function get() { return [ - 'name' => WPFunctions::get()->__("Makeup Blog", 'mailpoet'), + 'name' => __("Makeup Blog", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -90,7 +90,7 @@ class LifestyleBlogA { 0 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -888,7 +888,7 @@ class LifestyleBlogA { 3 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1120,7 +1120,7 @@ class LifestyleBlogA { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1257,7 +1257,7 @@ class LifestyleBlogA { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogB.php b/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogB.php index 73e5f7fde6..79fdecbb59 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogB.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/LifestyleBlogB.php @@ -16,7 +16,7 @@ class LifestyleBlogB { public function get() { return [ - 'name' => WPFunctions::get()->__("Lifestyle Blog", 'mailpoet'), + 'name' => __("Lifestyle Blog", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -152,7 +152,7 @@ class LifestyleBlogB { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1107,7 +1107,7 @@ class LifestyleBlogB { 2 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1340,7 +1340,7 @@ class LifestyleBlogB { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1487,7 +1487,7 @@ class LifestyleBlogB { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Minimal.php b/mailpoet/lib/Config/PopulatorData/Templates/Minimal.php index fc590d5843..3bf423c9bf 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Minimal.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Minimal.php @@ -16,7 +16,7 @@ class Minimal { public function get() { return [ - 'name' => WPFunctions::get()->__("Minimal", 'mailpoet'), + 'name' => __("Minimal", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -779,8 +779,8 @@ class Minimal { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

-

'.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').'

+

'.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1065,7 +1065,7 @@ class Minimal { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1190,7 +1190,7 @@ class Minimal { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/ModularStyleStories.php b/mailpoet/lib/Config/PopulatorData/Templates/ModularStyleStories.php index 8963eea1c9..26da7d679f 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/ModularStyleStories.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/ModularStyleStories.php @@ -16,7 +16,7 @@ class ModularStyleStories { public function get() { return [ - 'name' => WPFunctions::get()->__("Modular Style Stories", 'mailpoet'), + 'name' => __("Modular Style Stories", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -1019,7 +1019,7 @@ class ModularStyleStories { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1287,7 +1287,7 @@ class ModularStyleStories { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1419,7 +1419,7 @@ class ModularStyleStories { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Mosque.php b/mailpoet/lib/Config/PopulatorData/Templates/Mosque.php index e3b67c7b1f..a4d80c6378 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Mosque.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Mosque.php @@ -144,7 +144,7 @@ class Mosque { 0 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1409,7 +1409,7 @@ class Mosque { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1643,7 +1643,7 @@ class Mosque { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1780,7 +1780,7 @@ class Mosque { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Motor.php b/mailpoet/lib/Config/PopulatorData/Templates/Motor.php index fb553af560..18cd1e3c4a 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Motor.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Motor.php @@ -235,7 +235,7 @@ class Motor { [ 'type' => 'text', 'text' => '

Welcome to Vector Motors

-

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', +

'.__("View this in your browser.", 'mailpoet').'

', ], ], ], @@ -787,7 +787,7 @@ class Motor { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1049,7 +1049,7 @@ class Motor { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1185,7 +1185,7 @@ class Motor { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Music.php b/mailpoet/lib/Config/PopulatorData/Templates/Music.php index 1f6ad58d9f..972ba0abdf 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Music.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Music.php @@ -15,7 +15,7 @@ class Music { public function get() { return [ - 'name' => WPFunctions::get()->__("Music", 'mailpoet'), + 'name' => __("Music", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -1087,8 +1087,8 @@ class Music { 2 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

-

'.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').'

+

'.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', ], ], ], @@ -1333,7 +1333,7 @@ class Music { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1458,7 +1458,7 @@ class Music { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NewsDay.php b/mailpoet/lib/Config/PopulatorData/Templates/NewsDay.php index 49f86e4b6e..18f1e7c3d7 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NewsDay.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NewsDay.php @@ -16,7 +16,7 @@ class NewsDay { public function get() { return [ - 'name' => WPFunctions::get()->__("News Day", 'mailpoet'), + 'name' => __("News Day", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -559,7 +559,7 @@ class NewsDay { [ 'type' => 'footer', 'text' => '

NewsDay

-

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

+

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', 'styles' => [ @@ -946,7 +946,7 @@ class NewsDay { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1070,7 +1070,7 @@ class NewsDay { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php index 26f455b473..897aac8884 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php @@ -20,7 +20,7 @@ class NewsletterBlank121Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Newsletter: Blank 1:2:1 Column", 'mailpoet'), + 'name' => __("Newsletter: Blank 1:2:1 Column", 'mailpoet'), 'categories' => json_encode(['standard', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class NewsletterBlank121Column { "blocks" => [ [ "type" => "header", - "text" => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + "text" => ''.__("View this in your browser.", 'mailpoet').'', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -111,7 +111,7 @@ class NewsletterBlank121Column { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -123,7 +123,7 @@ class NewsletterBlank121Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Let's Get Started!

\n

It's time to design your newsletter! In the right sidebar, you'll find four menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), + "text" => __("

Let's Get Started!

\n

It's time to design your newsletter! In the right sidebar, you'll find four menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), ], [ "type" => "divider", @@ -161,11 +161,11 @@ class NewsletterBlank121Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('This template has...', 'mailpoet') . '

', + "text" => '

' . __('This template has...', 'mailpoet') . '

', ], [ "type" => "text", - "text" => WPFunctions::get()->__("

In the right sidebar, you can add layout blocks to your email:

\n", 'mailpoet'), + "text" => __("

In the right sidebar, you can add layout blocks to your email:

\n", 'mailpoet'), ], ], ], @@ -180,11 +180,11 @@ class NewsletterBlank121Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('... a 2-column layout.', 'mailpoet') . '

', + "text" => '

' . __('... a 2-column layout.', 'mailpoet') . '

', ], [ "type" => "text", - "text" => '

' . WPFunctions::get()->__("You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.", 'mailpoet') . '

', + "text" => '

' . __("You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.", 'mailpoet') . '

', ], ], ], @@ -244,7 +244,7 @@ class NewsletterBlank121Column { "blocks" => [ [ "type" => "text", - "text" => WPFunctions::get()->__("

Let's end with a single column.

\n

In the right sidebar, you can add these layout blocks to your email:

\n

\n", 'mailpoet'), + "text" => __("

Let's end with a single column.

\n

In the right sidebar, you can add these layout blocks to your email:

\n

\n", 'mailpoet'), ], ], ], @@ -318,7 +318,7 @@ class NewsletterBlank121Column { ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php index 0e8511afad..f20e850b2d 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php @@ -20,7 +20,7 @@ class NewsletterBlank12Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Newsletter: Blank 1:2 Column", 'mailpoet'), + 'name' => __("Newsletter: Blank 1:2 Column", 'mailpoet'), 'categories' => json_encode(['standard', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class NewsletterBlank12Column { "blocks" => [ [ "type" => "header", - "text" => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + "text" => ''.__("View this in your browser.", 'mailpoet').'', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -111,7 +111,7 @@ class NewsletterBlank12Column { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -123,7 +123,7 @@ class NewsletterBlank12Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Let's Get Started!

\n

 

\n

It's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), + "text" => __("

Let's Get Started!

\n

 

\n

It's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), ], [ "type" => "divider", @@ -161,11 +161,11 @@ class NewsletterBlank12Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('This template has...', 'mailpoet') . '

', + "text" => '

' . __('This template has...', 'mailpoet') . '

', ], [ "type" => "text", - "text" => WPFunctions::get()->__("

In the right sidebar, you can add these layout blocks to your email:

\n", 'mailpoet'), + "text" => __("

In the right sidebar, you can add these layout blocks to your email:

\n", 'mailpoet'), ], ], ], @@ -180,11 +180,11 @@ class NewsletterBlank12Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('... a 2-column layout.', 'mailpoet') . '

', + "text" => '

' . __('... a 2-column layout.', 'mailpoet') . '

', ], [ "type" => "text", - "text" => WPFunctions::get()->__("

You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.

", 'mailpoet'), + "text" => __("

You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.

", 'mailpoet'), ], ], ], @@ -258,7 +258,7 @@ class NewsletterBlank12Column { ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php index 19d61a1cbe..2c08855721 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php @@ -20,7 +20,7 @@ class NewsletterBlank13Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Newsletter: Blank 1:3 Column", 'mailpoet'), + 'name' => __("Newsletter: Blank 1:3 Column", 'mailpoet'), 'categories' => json_encode(['standard', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class NewsletterBlank13Column { "blocks" => [ [ "type" => "header", - "text" => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + "text" => ''.__("View this in your browser.", 'mailpoet').'', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -111,7 +111,7 @@ class NewsletterBlank13Column { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -123,7 +123,7 @@ class NewsletterBlank13Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Let's Get Started!

\n

 

\n

It's time to design your newsletter! In the right sidebar, you'll find four menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), + "text" => __("

Let's Get Started!

\n

 

\n

It's time to design your newsletter! In the right sidebar, you'll find four menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), ], [ "type" => "divider", @@ -161,11 +161,11 @@ class NewsletterBlank13Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('This template...', 'mailpoet') . '

', + "text" => '

' . __('This template...', 'mailpoet') . '

', ], [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('In the right sidebar, you can add layout blocks to your newsletter.', 'mailpoet') . '

', + "text" => '

' . __('In the right sidebar, you can add layout blocks to your newsletter.', 'mailpoet') . '

', ], ], ], @@ -180,11 +180,11 @@ class NewsletterBlank13Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('... has a...', 'mailpoet') . '

', + "text" => '

' . __('... has a...', 'mailpoet') . '

', ], [ "type" => "text", - "text" => WPFunctions::get()->__("

You have the choice of:

\n", 'mailpoet'), + "text" => __("

You have the choice of:

\n", 'mailpoet'), ], ], ], @@ -199,11 +199,11 @@ class NewsletterBlank13Column { "blocks" => [ [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('3-column layout.', 'mailpoet') . '

', + "text" => '

' . __('3-column layout.', 'mailpoet') . '

', ], [ "type" => "text", - "text" => '

' . WPFunctions::get()->__('You can add as many layout blocks as you want!', 'mailpoet') . '

', + "text" => '

' . __('You can add as many layout blocks as you want!', 'mailpoet') . '

', ], [ "type" => "text", @@ -281,7 +281,7 @@ class NewsletterBlank13Column { ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php index 3c25b3dd7c..ca4f0c25b8 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php @@ -20,7 +20,7 @@ class NewsletterBlank1Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Newsletter: Blank 1 Column", 'mailpoet'), + 'name' => __("Newsletter: Blank 1 Column", 'mailpoet'), 'categories' => json_encode(['standard', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class NewsletterBlank1Column { "blocks" => [ [ "type" => "header", - "text" => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + "text" => ''.__("View this in your browser.", 'mailpoet').'', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -111,7 +111,7 @@ class NewsletterBlank1Column { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -123,7 +123,7 @@ class NewsletterBlank1Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Let's Get Started!

\n

 

\n

It's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), + "text" => __("

Let's Get Started!

\n

 

\n

It's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:

\n
    \n
  1. Content
  2. \n
  3. Columns
  4. \n
  5. Styles
  6. \n
  7. Preview
  8. \n
", 'mailpoet'), ], ], ], @@ -197,7 +197,7 @@ class NewsletterBlank1Column { ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NewspaperTraditional.php b/mailpoet/lib/Config/PopulatorData/Templates/NewspaperTraditional.php index 0012ec3e60..11bdc9cfb1 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NewspaperTraditional.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NewspaperTraditional.php @@ -16,7 +16,7 @@ class NewspaperTraditional { public function get() { return [ - 'name' => WPFunctions::get()->__("Newspaper Traditional", 'mailpoet'), + 'name' => __("Newspaper Traditional", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -140,7 +140,7 @@ class NewspaperTraditional { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -719,7 +719,7 @@ class NewspaperTraditional { 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1061,7 +1061,7 @@ class NewspaperTraditional { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1208,7 +1208,7 @@ class NewspaperTraditional { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/NotSoMedium.php b/mailpoet/lib/Config/PopulatorData/Templates/NotSoMedium.php index 81135af80f..14f89f4b4d 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/NotSoMedium.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/NotSoMedium.php @@ -16,7 +16,7 @@ class NotSoMedium { public function get() { return [ - 'name' => WPFunctions::get()->__("One Full Post In An Email", 'mailpoet'), + 'name' => __("One Full Post In An Email", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -601,7 +601,7 @@ class NotSoMedium { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -856,7 +856,7 @@ class NotSoMedium { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -983,7 +983,7 @@ class NotSoMedium { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Painter.php b/mailpoet/lib/Config/PopulatorData/Templates/Painter.php index 89445d5224..cb4e9d2abf 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Painter.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Painter.php @@ -102,7 +102,7 @@ class Painter { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1032,7 +1032,7 @@ class Painter { [ 'type' => 'text', 'text' => '

Canvas Studio

-

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', +

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', ], ], ], @@ -1245,7 +1245,7 @@ class Painter { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1392,7 +1392,7 @@ class Painter { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Phone.php b/mailpoet/lib/Config/PopulatorData/Templates/Phone.php index d8cac204fa..68cd48f55c 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Phone.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Phone.php @@ -16,7 +16,7 @@ class Phone { public function get() { return [ - 'name' => WPFunctions::get()->__("New Phone Purchase", 'mailpoet'), + 'name' => __("New Phone Purchase", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -413,8 +413,8 @@ class Phone { 0 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

-

'.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').'

+

'.__("Manage your subscription", 'mailpoet').'

', ], ], ], @@ -627,7 +627,7 @@ class Phone { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -751,7 +751,7 @@ class Phone { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Photography.php b/mailpoet/lib/Config/PopulatorData/Templates/Photography.php index 990654f3b0..c9b2b26f96 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Photography.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Photography.php @@ -152,7 +152,7 @@ class Photography { 1 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', ], ], ], @@ -1697,7 +1697,7 @@ class Photography { 3 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1943,7 +1943,7 @@ class Photography { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -2090,7 +2090,7 @@ class Photography { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/PieceOfCake.php b/mailpoet/lib/Config/PopulatorData/Templates/PieceOfCake.php index 8ff19eda44..49126bc123 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/PieceOfCake.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/PieceOfCake.php @@ -16,7 +16,7 @@ class PieceOfCake { public function get() { return [ - 'name' => WPFunctions::get()->__("Piece of cake", 'mailpoet'), + 'name' => __("Piece of cake", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -55,7 +55,7 @@ class PieceOfCake { 'blocks' => [ 0 => [ 'type' => 'header', - 'text' => '

Open daily from 9am to 9pm | ' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

Open daily from 9am to 9pm | ' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => [ 'backgroundColor' => '#ececeb', @@ -364,7 +364,7 @@ class PieceOfCake { 'blocks' => [ 0 => [ 'type' => 'text', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . '

+ 'text' => '

' . __("Unsubscribe", 'mailpoet') . '

Manage Subscription

', ], ], diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Poet.php b/mailpoet/lib/Config/PopulatorData/Templates/Poet.php index 5289e70cf4..49228af61b 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Poet.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Poet.php @@ -177,7 +177,7 @@ class Poet { 0 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -864,7 +864,7 @@ class Poet { 0 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1097,7 +1097,7 @@ class Poet { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1241,7 +1241,7 @@ class Poet { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php b/mailpoet/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php index 6d51dd1ba2..638fa18bf9 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php @@ -20,7 +20,7 @@ class PostNotificationsBlank1Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Post Notifications: Blank 1 Column", 'mailpoet'), + 'name' => __("Post Notifications: Blank 1 Column", 'mailpoet'), 'categories' => json_encode(['notification', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class PostNotificationsBlank1Column { "blocks" => [ [ "type" => "header", - "text" => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + "text" => '' . __("View this in your browser.", 'mailpoet') . '', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -123,7 +123,7 @@ class PostNotificationsBlank1Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Check Out Our New Blog Posts!

\n

 

\n

MailPoet can automatically send your new blog posts to your subscribers.

\n

\n

Below, you'll find three recent posts, which are displayed automatically, thanks to the Automatic Latest Content widget, which can be found in the right sidebar, under Content.

\n

\n

To edit the settings and styles of your post, simply click on a post below.

", 'mailpoet'), + "text" => __("

Check Out Our New Blog Posts!

\n

 

\n

MailPoet can automatically send your new blog posts to your subscribers.

\n

\n

Below, you'll find three recent posts, which are displayed automatically, thanks to the Automatic Latest Content widget, which can be found in the right sidebar, under Content.

\n

\n

To edit the settings and styles of your post, simply click on a post below.

", 'mailpoet'), ], [ "type" => "divider", @@ -164,14 +164,14 @@ class PostNotificationsBlank1Column { "imageFullWidth" => false, "featuredImagePosition" => "alternate", "showAuthor" => "no", - "authorPrecededBy" => WPFunctions::get()->__("Author:", 'mailpoet'), + "authorPrecededBy" => __("Author:", 'mailpoet'), "showCategories" => "no", - "categoriesPrecededBy" => WPFunctions::get()->__("Categories:", 'mailpoet'), + "categoriesPrecededBy" => __("Categories:", 'mailpoet'), "readMoreType" => "button", "readMoreText" => "Read more", "readMoreButton" => [ "type" => "button", - "text" => WPFunctions::get()->__("Read the post", 'mailpoet'), + "text" => __("Read the post", 'mailpoet'), "url" => "[postLink]", "styles" => [ "block" => [ @@ -284,7 +284,7 @@ class PostNotificationsBlank1Column { ], [ "type" => "footer", - "text" => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + "text" => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/PrimarySchool.php b/mailpoet/lib/Config/PopulatorData/Templates/PrimarySchool.php index 6a87f3264c..3f8ee285dd 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/PrimarySchool.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/PrimarySchool.php @@ -16,7 +16,7 @@ class PrimarySchool { public function get() { return [ - 'name' => WPFunctions::get()->__("Primary School", 'mailpoet'), + 'name' => __("Primary School", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -102,7 +102,7 @@ class PrimarySchool { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -956,7 +956,7 @@ class PrimarySchool { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1190,7 +1190,7 @@ class PrimarySchool { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1337,7 +1337,7 @@ class PrimarySchool { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/RealEstate.php b/mailpoet/lib/Config/PopulatorData/Templates/RealEstate.php index 4568870cae..3f9e1bbcf5 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/RealEstate.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/RealEstate.php @@ -16,7 +16,7 @@ class RealEstate { public function get() { return [ - 'name' => WPFunctions::get()->__("Real Estate", 'mailpoet'), + 'name' => __("Real Estate", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -720,7 +720,7 @@ class RealEstate { 1 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -964,7 +964,7 @@ class RealEstate { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1089,7 +1089,7 @@ class RealEstate { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/RenewableEnergy.php b/mailpoet/lib/Config/PopulatorData/Templates/RenewableEnergy.php index d17b74e1e1..d9094062ab 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/RenewableEnergy.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/RenewableEnergy.php @@ -15,7 +15,7 @@ class RenewableEnergy { public function get() { return [ - 'name' => WPFunctions::get()->__("Renewable Energy", 'mailpoet'), + 'name' => __("Renewable Energy", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -974,7 +974,7 @@ class RenewableEnergy { 3 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', ], ], ], @@ -1188,7 +1188,7 @@ class RenewableEnergy { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1324,7 +1324,7 @@ class RenewableEnergy { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Retro.php b/mailpoet/lib/Config/PopulatorData/Templates/Retro.php index c02a3b9a1d..f8073b618a 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Retro.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Retro.php @@ -16,7 +16,7 @@ class Retro { public function get() { return [ - 'name' => WPFunctions::get()->__("Retro", 'mailpoet'), + 'name' => __("Retro", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -829,7 +829,7 @@ class Retro { 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1182,7 +1182,7 @@ class Retro { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1307,7 +1307,7 @@ class Retro { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/RetroComputingMagazine.php b/mailpoet/lib/Config/PopulatorData/Templates/RetroComputingMagazine.php index 8b8aa21899..16952d4cd4 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/RetroComputingMagazine.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/RetroComputingMagazine.php @@ -15,7 +15,7 @@ class RetroComputingMagazine { public function get() { return [ - 'name' => WPFunctions::get()->__("Retro Computing Magazine", 'mailpoet'), + 'name' => __("Retro Computing Magazine", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -160,7 +160,7 @@ class RetroComputingMagazine { 0 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -589,7 +589,7 @@ class RetroComputingMagazine { 3 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/RockBand.php b/mailpoet/lib/Config/PopulatorData/Templates/RockBand.php index 16d45fa353..39000977e6 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/RockBand.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/RockBand.php @@ -144,7 +144,7 @@ class RockBand { 0 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -840,7 +840,7 @@ class RockBand { 2 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1074,7 +1074,7 @@ class RockBand { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1211,7 +1211,7 @@ class RockBand { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/RssSimpleNews.php b/mailpoet/lib/Config/PopulatorData/Templates/RssSimpleNews.php index cb2c66b763..8c0731adb9 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/RssSimpleNews.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/RssSimpleNews.php @@ -15,7 +15,7 @@ class RssSimpleNews { public function get() { return [ - 'name' => WPFunctions::get()->__("Stripped RSS Style Layout", 'mailpoet'), + 'name' => __("Stripped RSS Style Layout", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -448,8 +448,8 @@ class RssSimpleNews { [ 'type' => 'text', 'text' => '

RSS Simple

-

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

-

'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', +

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

+

'.__("Add your postal address here!", 'mailpoet').'

', ], ], ], @@ -686,7 +686,7 @@ class RssSimpleNews { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -809,7 +809,7 @@ class RssSimpleNews { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/ScienceWeekly.php b/mailpoet/lib/Config/PopulatorData/Templates/ScienceWeekly.php index 7e4745c618..a12cb3b733 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/ScienceWeekly.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/ScienceWeekly.php @@ -15,7 +15,7 @@ class ScienceWeekly { public function get() { return [ - 'name' => WPFunctions::get()->__("Science Weekly", 'mailpoet'), + 'name' => __("Science Weekly", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -769,7 +769,7 @@ class ScienceWeekly { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1036,7 +1036,7 @@ class ScienceWeekly { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1162,7 +1162,7 @@ class ScienceWeekly { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Shoes.php b/mailpoet/lib/Config/PopulatorData/Templates/Shoes.php index feaeaa7bdf..641b3d8c71 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Shoes.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Shoes.php @@ -15,7 +15,7 @@ class Shoes { public function get() { return [ - 'name' => WPFunctions::get()->__("Shoes", 'mailpoet'), + 'name' => __("Shoes", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -506,7 +506,7 @@ class Shoes { 'blocks' => [ 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/SimpleText.php b/mailpoet/lib/Config/PopulatorData/Templates/SimpleText.php index bcb375bef6..39e6172bc4 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/SimpleText.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/SimpleText.php @@ -20,7 +20,7 @@ class SimpleText { public function get() { return [ - 'name' => WPFunctions::get()->__("Simple Text", 'mailpoet'), + 'name' => __("Simple Text", 'mailpoet'), 'categories' => json_encode(['standard', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -70,7 +70,7 @@ class SimpleText { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -82,7 +82,7 @@ class SimpleText { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Hi [subscriber:firstname | default:subscriber],

\n

\n

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.

\n

\n

Is this too simple? You can still style your text with basic formatting, like bold or italics.

\n

\n

Finally, you can also add a call-to-action button between 2 blocks of text, like this:

", 'mailpoet'), + "text" => __("

Hi [subscriber:firstname | default:subscriber],

\n

\n

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.

\n

\n

Is this too simple? You can still style your text with basic formatting, like bold or italics.

\n

\n

Finally, you can also add a call-to-action button between 2 blocks of text, like this:

", 'mailpoet'), ], ], ], @@ -117,7 +117,7 @@ class SimpleText { ], [ "type" => "button", - "text" => WPFunctions::get()->__("It's time to take action!", 'mailpoet'), + "text" => __("It's time to take action!", 'mailpoet'), "url" => "", "styles" => [ "block" => [ @@ -138,11 +138,11 @@ class SimpleText { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Thanks for reading. See you soon!

\n

 

\n

The MailPoet Team

", 'mailpoet'), + "text" => __("

Thanks for reading. See you soon!

\n

 

\n

The MailPoet Team

", 'mailpoet'), ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Software.php b/mailpoet/lib/Config/PopulatorData/Templates/Software.php index 71342873bf..b4078280e4 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Software.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Software.php @@ -15,7 +15,7 @@ class Software { public function get() { return [ - 'name' => WPFunctions::get()->__("Software", 'mailpoet'), + 'name' => __("Software", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -904,7 +904,7 @@ class Software { 3 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1149,7 +1149,7 @@ class Software { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1286,7 +1286,7 @@ class Software { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Sunglasses.php b/mailpoet/lib/Config/PopulatorData/Templates/Sunglasses.php index d6d38cc9bb..352e9f4fa1 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Sunglasses.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Sunglasses.php @@ -15,7 +15,7 @@ class Sunglasses { public function get() { return [ - 'name' => WPFunctions::get()->__("Sunglasses", 'mailpoet'), + 'name' => __("Sunglasses", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -657,7 +657,7 @@ class Sunglasses { 1 => [ 'type' => 'text', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', ], ], ], diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Synagogue.php b/mailpoet/lib/Config/PopulatorData/Templates/Synagogue.php index 6155da6281..1b887597d0 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Synagogue.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Synagogue.php @@ -102,7 +102,7 @@ class Synagogue { 1 => [ 'type' => 'header', - 'text' => '

'.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'

', + 'text' => '

'.__("View this in your browser.", 'mailpoet').'

', 'styles' => [ 'block' => @@ -1349,7 +1349,7 @@ class Synagogue { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1637,7 +1637,7 @@ class Synagogue { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1774,7 +1774,7 @@ class Synagogue { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/TakeAHike.php b/mailpoet/lib/Config/PopulatorData/Templates/TakeAHike.php index d6e692005a..eb570efe7a 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/TakeAHike.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/TakeAHike.php @@ -15,7 +15,7 @@ class TakeAHike { public function get() { return [ - 'name' => WPFunctions::get()->__("Take a Hike", 'mailpoet'), + 'name' => __("Take a Hike", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -644,7 +644,7 @@ class TakeAHike { 'blocks' => [ 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', @@ -674,7 +674,7 @@ class TakeAHike { 'blocks' => [ 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/Vlogger.php b/mailpoet/lib/Config/PopulatorData/Templates/Vlogger.php index f273ac2b95..bbb87c4e2e 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/Vlogger.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/Vlogger.php @@ -102,7 +102,7 @@ class Vlogger { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1000,7 +1000,7 @@ class Vlogger { 1 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1252,7 +1252,7 @@ class Vlogger { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1399,7 +1399,7 @@ class Vlogger { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php b/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php index e341f1fcb4..df883127d8 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php @@ -20,7 +20,7 @@ class WelcomeBlank12Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Welcome Email: Blank 1:2 Column", 'mailpoet'), + 'name' => __("Welcome Email: Blank 1:2 Column", 'mailpoet'), 'categories' => json_encode(['welcome', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class WelcomeBlank12Column { "blocks" => [ [ "type" => "header", - "text" => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + "text" => ''.__("View this in your browser.", 'mailpoet').'', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -111,7 +111,7 @@ class WelcomeBlank12Column { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -123,7 +123,7 @@ class WelcomeBlank12Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Hi, new subscriber!

\n

 

\n

[subscriber:firstname | default:Subscriber],

\n

 

\n

You recently joined our list and we'd like to give you a warm welcome!

", 'mailpoet'), + "text" => __("

Hi, new subscriber!

\n

 

\n

[subscriber:firstname | default:Subscriber],

\n

 

\n

You recently joined our list and we'd like to give you a warm welcome!

", 'mailpoet'), ], [ "type" => "divider", @@ -170,11 +170,11 @@ class WelcomeBlank12Column { "blocks" => [ [ "type" => "text", - "text" => WPFunctions::get()->__("

Our Most Popular Posts

", 'mailpoet'), + "text" => __("

Our Most Popular Posts

", 'mailpoet'), ], [ "type" => "text", - "text" => WPFunctions::get()->__("", 'mailpoet'), + "text" => __("", 'mailpoet'), ], ], ], @@ -189,15 +189,15 @@ class WelcomeBlank12Column { "blocks" => [ [ "type" => "text", - "text" => WPFunctions::get()->__("

What's Next?

", 'mailpoet'), + "text" => __("

What's Next?

", 'mailpoet'), ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Add a single button to your newsletter in order to have one clear call-to-action, which will increase your click rates.

", 'mailpoet'), + "text" => __("

Add a single button to your newsletter in order to have one clear call-to-action, which will increase your click rates.

", 'mailpoet'), ], [ "type" => "button", - "text" => WPFunctions::get()->__("Read up!", 'mailpoet'), + "text" => __("Read up!", 'mailpoet'), "url" => "", "styles" => [ "block" => [ @@ -288,7 +288,7 @@ class WelcomeBlank12Column { ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php b/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php index a05957e6c5..4d81bca544 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php @@ -20,7 +20,7 @@ class WelcomeBlank1Column { public function get() { return [ - 'name' => WPFunctions::get()->__("Welcome Email: Blank 1 Column", 'mailpoet'), + 'name' => __("Welcome Email: Blank 1 Column", 'mailpoet'), 'categories' => json_encode(['welcome', 'blank']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -59,7 +59,7 @@ class WelcomeBlank1Column { "blocks" => [ [ "type" => "header", - "text" => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + "text" => ''.__("View this in your browser.", 'mailpoet').'', "styles" => [ "block" => [ "backgroundColor" => "transparent", @@ -111,7 +111,7 @@ class WelcomeBlank1Column { "type" => "image", "link" => "", "src" => $this->template_image_url . "/fake-logo.png", - "alt" => WPFunctions::get()->__("Fake logo", 'mailpoet'), + "alt" => __("Fake logo", 'mailpoet'), "fullWidth" => false, "width" => "598px", "height" => "71px", @@ -123,7 +123,7 @@ class WelcomeBlank1Column { ], [ "type" => "text", - "text" => WPFunctions::get()->__("

Hi, new subscriber!

\n

 

\n

[subscriber:firstname | default:Subscriber],

\n

 

\n

You recently joined our list and we'd like to give you a warm welcome!

\n

 

\n

Want to get to know us better? Check out some of our most popular articles:

\n
    \n
  1. The Importance of Focus When Writing
  2. \n
  3. How to Write a Great Subject Line
  4. \n
  5. Just Sit Down and Write – Advice on Motivation from Ernest Hemingway
  6. \n
", 'mailpoet'), + "text" => __("

Hi, new subscriber!

\n

 

\n

[subscriber:firstname | default:Subscriber],

\n

 

\n

You recently joined our list and we'd like to give you a warm welcome!

\n

 

\n

Want to get to know us better? Check out some of our most popular articles:

\n
    \n
  1. The Importance of Focus When Writing
  2. \n
  3. How to Write a Great Subject Line
  4. \n
  5. Just Sit Down and Write – Advice on Motivation from Ernest Hemingway
  6. \n
", 'mailpoet'), ], ], ], @@ -197,7 +197,7 @@ class WelcomeBlank1Column { ], [ "type" => "footer", - "text" => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + "text" => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', "styles" => [ "block" => [ "backgroundColor" => "transparent", diff --git a/mailpoet/lib/Config/PopulatorData/Templates/WideStoryLayout.php b/mailpoet/lib/Config/PopulatorData/Templates/WideStoryLayout.php index 536488222b..47cc339809 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/WideStoryLayout.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/WideStoryLayout.php @@ -15,7 +15,7 @@ class WideStoryLayout { public function get() { return [ - 'name' => WPFunctions::get()->__("Wide Story Layout", 'mailpoet'), + 'name' => __("Wide Story Layout", 'mailpoet'), 'categories' => json_encode(['notification', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -357,7 +357,7 @@ class WideStoryLayout { 2 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -623,7 +623,7 @@ class WideStoryLayout { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -748,7 +748,7 @@ class WideStoryLayout { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/WineCity.php b/mailpoet/lib/Config/PopulatorData/Templates/WineCity.php index 0d825f2ccc..4b694a4458 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/WineCity.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/WineCity.php @@ -15,7 +15,7 @@ class WineCity { public function get() { return [ - 'name' => WPFunctions::get()->__("Wine City (with coupon)", 'mailpoet'), + 'name' => __("Wine City (with coupon)", 'mailpoet'), 'categories' => json_encode(['woocommerce', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -501,7 +501,7 @@ class WineCity { 4 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -798,7 +798,7 @@ class WineCity { ], 'footer' => [ - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => @@ -934,7 +934,7 @@ class WineCity { ], 'header' => [ - 'text' => ''.WPFunctions::get()->__("View this in your browser.", 'mailpoet').'', + 'text' => ''.__("View this in your browser.", 'mailpoet').'', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/WordPressTheme.php b/mailpoet/lib/Config/PopulatorData/Templates/WordPressTheme.php index d9b0eaec0a..1539a71946 100755 --- a/mailpoet/lib/Config/PopulatorData/Templates/WordPressTheme.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/WordPressTheme.php @@ -16,7 +16,7 @@ class WordPressTheme { public function get() { return [ - 'name' => WPFunctions::get()->__("WordPress Theme", 'mailpoet'), + 'name' => __("WordPress Theme", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -102,7 +102,7 @@ class WordPressTheme { 1 => [ 'type' => 'header', - 'text' => '

' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '

', + 'text' => '

' . __("View this in your browser.", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1029,7 +1029,7 @@ class WordPressTheme { 0 => [ 'type' => 'footer', - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1263,7 +1263,7 @@ class WordPressTheme { ], 'footer' => [ - 'text' => '

' . WPFunctions::get()->__("Unsubscribe", 'mailpoet') . ' | ' . WPFunctions::get()->__("Manage your subscription", 'mailpoet') . '
' . WPFunctions::get()->__("Add your postal address here!", 'mailpoet') . '

', + 'text' => '

' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '

', 'styles' => [ 'block' => @@ -1410,7 +1410,7 @@ class WordPressTheme { ], 'header' => [ - 'text' => '' . WPFunctions::get()->__("View this in your browser.", 'mailpoet') . '', + 'text' => '' . __("View this in your browser.", 'mailpoet') . '', 'styles' => [ 'block' => diff --git a/mailpoet/lib/Config/PopulatorData/Templates/WorldCup.php b/mailpoet/lib/Config/PopulatorData/Templates/WorldCup.php index 91b27f6093..da3bbe4d37 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/WorldCup.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/WorldCup.php @@ -15,7 +15,7 @@ class WorldCup { public function get() { return [ - 'name' => WPFunctions::get()->__("World Cup", 'mailpoet'), + 'name' => __("World Cup", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -721,7 +721,7 @@ class WorldCup { ], [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').' | '.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'
'.WPFunctions::get()->__("Add your postal address here!", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').' | '.__("Manage your subscription", 'mailpoet').'
'.__("Add your postal address here!", 'mailpoet').'

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', diff --git a/mailpoet/lib/Config/PopulatorData/Templates/YogaStudio.php b/mailpoet/lib/Config/PopulatorData/Templates/YogaStudio.php index 9225ccddfe..e1e359ac3e 100644 --- a/mailpoet/lib/Config/PopulatorData/Templates/YogaStudio.php +++ b/mailpoet/lib/Config/PopulatorData/Templates/YogaStudio.php @@ -15,7 +15,7 @@ class YogaStudio { public function get() { return [ - 'name' => WPFunctions::get()->__("Yoga Studio", 'mailpoet'), + 'name' => __("Yoga Studio", 'mailpoet'), 'categories' => json_encode(['standard', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), @@ -695,7 +695,7 @@ class YogaStudio { 'blocks' => [ 0 => [ 'type' => 'footer', - 'text' => '

'.WPFunctions::get()->__("Unsubscribe", 'mailpoet').'

'.WPFunctions::get()->__("Manage your subscription", 'mailpoet').'

', + 'text' => '

'.__("Unsubscribe", 'mailpoet').'

'.__("Manage your subscription", 'mailpoet').'

', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', @@ -791,4 +791,4 @@ class YogaStudio { return $this->template_image_url . '/thumbnail.20190411-1500.jpg'; } -} \ No newline at end of file +} diff --git a/mailpoet/lib/Config/PrivacyPolicy.php b/mailpoet/lib/Config/PrivacyPolicy.php index 5c65aa8c65..6e760410a4 100644 --- a/mailpoet/lib/Config/PrivacyPolicy.php +++ b/mailpoet/lib/Config/PrivacyPolicy.php @@ -16,50 +16,50 @@ class PrivacyPolicy { public function getPrivacyPolicyContent() { $content = ( '

' . - WPFunctions::get()->__('MailPoet newsletter & emails', 'mailpoet') . + __('MailPoet newsletter & emails', 'mailpoet') . '

' . '

' . - WPFunctions::get()->__('If you have subscribed to our newsletter or if you are a member of our website (you can log in) or if you have purchased on our website, there is a good chance you will receive emails from us.', 'mailpoet') . + __('If you have subscribed to our newsletter or if you are a member of our website (you can log in) or if you have purchased on our website, there is a good chance you will receive emails from us.', 'mailpoet') . '

' . '

' . - WPFunctions::get()->__('We will only send you emails which you have signed up to receive, or which pertain to the services we provided to you.', 'mailpoet') . + __('We will only send you emails which you have signed up to receive, or which pertain to the services we provided to you.', 'mailpoet') . '

' . '

' . - WPFunctions::get()->__('To send you emails, we use the name and email address you provide us. Our site also logs the IP address you used when you signed up for the service to prevent abuse of the system.', 'mailpoet') . + __('To send you emails, we use the name and email address you provide us. Our site also logs the IP address you used when you signed up for the service to prevent abuse of the system.', 'mailpoet') . '

' . '

' . Helpers::replaceLinkTags( - WPFunctions::get()->__('This website can send emails through the [link]MailPoet sending service[/link]. This service allows us to track opens and clicks on our emails. We use this information to improve the content of our newsletters.', 'mailpoet'), + __('This website can send emails through the [link]MailPoet sending service[/link]. This service allows us to track opens and clicks on our emails. We use this information to improve the content of our newsletters.', 'mailpoet'), 'https://www.mailpoet.com/privacy-notice/', ['target' => '_blank'] ) . '

' . '

' . - WPFunctions::get()->__('No identifiable information is otherwise tracked outside this website except for the email address.', 'mailpoet') . + __('No identifiable information is otherwise tracked outside this website except for the email address.', 'mailpoet') . '

' ); $helper = new WooCommerceHelper(); if ($helper->isWooCommerceActive()) { $content .= ( '

' . - WPFunctions::get()->__('MailPoet creates and stores two cookies if you are using WooCommerce and MailPoet together. Those cookies are:', 'mailpoet') . + __('MailPoet creates and stores two cookies if you are using WooCommerce and MailPoet together. Those cookies are:', 'mailpoet') . '

' . '

' . - sprintf(WPFunctions::get()->__('Cookie name: %s', 'mailpoet'), 'mailpoet_revenue_tracking' ) . + sprintf(__('Cookie name: %s', 'mailpoet'), 'mailpoet_revenue_tracking' ) . '
' . - sprintf(WPFunctions::get()->__('Cookie expiry: %s days.', 'mailpoet'), WPFunctions::get()->numberFormatI18n(14) ) . + sprintf(__('Cookie expiry: %s days.', 'mailpoet'), WPFunctions::get()->numberFormatI18n(14) ) . '
' . - WPFunctions::get()->__('Cookie description: The purpose of this cookie is to track which newsletter sent from your website has acquired a click-through and a subsequent purchase in your WooCommerce store.', 'mailpoet') . + __('Cookie description: The purpose of this cookie is to track which newsletter sent from your website has acquired a click-through and a subsequent purchase in your WooCommerce store.', 'mailpoet') . '

' . '

' . - sprintf(WPFunctions::get()->__('Cookie name: %s', 'mailpoet'), 'mailpoet_abandoned_cart_tracking' ) . + sprintf(__('Cookie name: %s', 'mailpoet'), 'mailpoet_abandoned_cart_tracking' ) . '
' . - sprintf(WPFunctions::get()->__('Cookie expiry: %s days.', 'mailpoet'), WPFunctions::get()->numberFormatI18n(3650) ) . + sprintf(__('Cookie expiry: %s days.', 'mailpoet'), WPFunctions::get()->numberFormatI18n(3650) ) . '
' . - WPFunctions::get()->__('Cookie description: The purpose of this cookie is to track a user that has abandoned their cart in your WooCommerce store to then be able to send them an abandoned cart newsletter from MailPoet.', 'mailpoet') . + __('Cookie description: The purpose of this cookie is to track a user that has abandoned their cart in your WooCommerce store to then be able to send them an abandoned cart newsletter from MailPoet.', 'mailpoet') . '
' . '
' . - WPFunctions::get()->__('Note: User must be opted-in and a confirmed subscriber.', 'mailpoet') . + __('Note: User must be opted-in and a confirmed subscriber.', 'mailpoet') . '

' ); } diff --git a/mailpoet/lib/Config/Renderer.php b/mailpoet/lib/Config/Renderer.php index d3b24f1d3b..ac7988630d 100644 --- a/mailpoet/lib/Config/Renderer.php +++ b/mailpoet/lib/Config/Renderer.php @@ -3,7 +3,6 @@ namespace MailPoet\Config; use MailPoet\Twig; -use MailPoet\WP\Functions as WPFunctions; use MailPoetVendor\Twig\Extension\DebugExtension; use MailPoetVendor\Twig\Lexer as TwigLexer; use MailPoetVendor\Twig\Loader\FilesystemLoader as TwigFileSystem; @@ -103,7 +102,7 @@ class Renderer { return $this->renderer->render($template, $context); } catch (\RuntimeException $e) { throw new \Exception(sprintf( - WPFunctions::get()->__('Failed to render template "%s". Please ensure the template cache folder "%s" exists and has write permissions. Terminated with error: "%s"'), + __('Failed to render template "%s". Please ensure the template cache folder "%s" exists and has write permissions. Terminated with error: "%s"'), $template, $this->cachePath, $e->getMessage() diff --git a/mailpoet/lib/Config/RequirementsChecker.php b/mailpoet/lib/Config/RequirementsChecker.php index b561645272..a45261412d 100644 --- a/mailpoet/lib/Config/RequirementsChecker.php +++ b/mailpoet/lib/Config/RequirementsChecker.php @@ -3,7 +3,6 @@ namespace MailPoet\Config; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; use MailPoet\WP\Notice as WPNotice; class RequirementsChecker { @@ -47,7 +46,7 @@ class RequirementsChecker { ]; if (!is_dir($paths['temp_path']) && !wp_mkdir_p($paths['temp_path'])) { $error = Helpers::replaceLinkTags( - WPFunctions::get()->__('MailPoet requires write permissions inside the /wp-content/uploads folder. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'), + __('MailPoet requires write permissions inside the /wp-content/uploads folder. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'), 'https://kb.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#folder_permissions', ['target' => '_blank'] ); @@ -68,7 +67,7 @@ class RequirementsChecker { public function checkPDOExtension() { if (extension_loaded('pdo') && extension_loaded('pdo_mysql')) return true; $error = Helpers::replaceLinkTags( - WPFunctions::get()->__('MailPoet requires a PDO_MYSQL PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'), + __('MailPoet requires a PDO_MYSQL PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'), 'https://kb.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension', ['target' => '_blank'] ); @@ -78,7 +77,7 @@ class RequirementsChecker { public function checkXmlExtension() { if (extension_loaded('xml')) return true; $error = Helpers::replaceLinkTags( - WPFunctions::get()->__('MailPoet requires an XML PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'), + __('MailPoet requires an XML PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'), 'https://kb.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension', ['target' => '_blank'] ); @@ -90,7 +89,7 @@ class RequirementsChecker { $dependencyPath = $this->getDependencyPath($dependency); if (!$dependencyPath) { $error = sprintf( - WPFunctions::get()->__('A MailPoet dependency (%s) does not appear to be loaded correctly, thus MailPoet will not work correctly. Please reinstall the plugin.', 'mailpoet'), + __('A MailPoet dependency (%s) does not appear to be loaded correctly, thus MailPoet will not work correctly. Please reinstall the plugin.', 'mailpoet'), $dependency ); @@ -101,7 +100,7 @@ class RequirementsChecker { $isLoadedByPlugin = preg_match($pattern, $dependencyPath); if (!$isLoadedByPlugin) { $error = sprintf( - WPFunctions::get()->__('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'), + __('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, $dependencyPath ); diff --git a/mailpoet/lib/Config/ServicesChecker.php b/mailpoet/lib/Config/ServicesChecker.php index e2f578f5c5..874d4dbba6 100644 --- a/mailpoet/lib/Config/ServicesChecker.php +++ b/mailpoet/lib/Config/ServicesChecker.php @@ -9,7 +9,6 @@ use MailPoet\Util\Helpers; use MailPoet\Util\License\Features\Subscribers as SubscribersFeature; use MailPoet\Util\License\License; use MailPoet\WP\DateTime; -use MailPoet\WP\Functions as WPFunctions; use MailPoet\WP\Notice as WPNotice; class ServicesChecker { @@ -62,7 +61,7 @@ class ServicesChecker { $dateTime = new DateTime(); $date = $dateTime->formatDate(strtotime($mssKey['data']['expire_at'])); $error = Helpers::replaceLinkTags( - WPFunctions::get()->__("Your newsletters are awesome! Don't forget to [link]upgrade your MailPoet email plan[/link] by %s to keep sending them to your subscribers.", 'mailpoet'), + __("Your newsletters are awesome! Don't forget to [link]upgrade your MailPoet email plan[/link] by %s to keep sending them to your subscribers.", 'mailpoet'), 'https://account.mailpoet.com?s=' . $this->subscribersFeature->getSubscribersCount(), ['target' => '_blank'] ); @@ -93,7 +92,7 @@ class ServicesChecker { || $premiumKey['state'] === Bridge::KEY_ALREADY_USED ) { if ($displayErrorNotice) { - $errorString = WPFunctions::get()->__('[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'); + $errorString = __('[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( $errorString, 'admin.php?page=mailpoet-settings#premium', @@ -117,7 +116,7 @@ class ServicesChecker { $dateTime = new DateTime(); $date = $dateTime->formatDate(strtotime($premiumKey['data']['expire_at'])); $error = Helpers::replaceLinkTags( - WPFunctions::get()->__("Your License Key for MailPoet is expiring! Don't forget to [link]renew your license[/link] by %s to keep enjoying automatic updates and Premium support.", 'mailpoet'), + __("Your License Key for MailPoet is expiring! Don't forget to [link]renew your license[/link] by %s to keep enjoying automatic updates and Premium support.", 'mailpoet'), 'https://account.mailpoet.com', ['target' => '_blank'] ); diff --git a/mailpoet/lib/Config/Shortcodes.php b/mailpoet/lib/Config/Shortcodes.php index 5ac0db097a..21915a1589 100644 --- a/mailpoet/lib/Config/Shortcodes.php +++ b/mailpoet/lib/Config/Shortcodes.php @@ -161,7 +161,7 @@ class Shortcodes { if (empty($newsletters)) { return $this->wp->applyFilters( 'mailpoet_archive_no_newsletters', - $this->wp->__('Oops! There are no newsletters to display.', 'mailpoet') + __('Oops! There are no newsletters to display.', 'mailpoet') ); } else { $title = $this->wp->applyFilters('mailpoet_archive_title', ''); diff --git a/mailpoet/lib/Cron/DaemonHttpRunner.php b/mailpoet/lib/Cron/DaemonHttpRunner.php index 6d49e021cd..3a37a83be2 100644 --- a/mailpoet/lib/Cron/DaemonHttpRunner.php +++ b/mailpoet/lib/Cron/DaemonHttpRunner.php @@ -61,10 +61,10 @@ class DaemonHttpRunner { } $this->addCacheHeaders(); if (!$requestData) { - $error = WPFunctions::get()->__('Invalid or missing request data.', 'mailpoet'); + $error = __('Invalid or missing request data.', 'mailpoet'); } else { if (!$this->settingsDaemonData) { - $error = WPFunctions::get()->__('Daemon does not exist.', 'mailpoet'); + $error = __('Daemon does not exist.', 'mailpoet'); } else { if ( !isset($requestData['token']) || @@ -78,7 +78,7 @@ class DaemonHttpRunner { return $this->abortWithError($error); } if ($this->daemon === null) { - return $this->abortWithError(WPFunctions::get()->__('Daemon does not set correctly.', 'mailpoet')); + return $this->abortWithError(__('Daemon does not set correctly.', 'mailpoet')); } $this->settingsDaemonData['token'] = $this->token; $this->daemon->run($this->settingsDaemonData); diff --git a/mailpoet/lib/Cron/Workers/SendingQueue/Migration.php b/mailpoet/lib/Cron/Workers/SendingQueue/Migration.php index aaf36969af..c69d079ab7 100644 --- a/mailpoet/lib/Cron/Workers/SendingQueue/Migration.php +++ b/mailpoet/lib/Cron/Workers/SendingQueue/Migration.php @@ -75,7 +75,7 @@ class Migration extends SimpleWorker { $mailerLog = MailerLog::setError( $mailerLog, 'migration', - WPFunctions::get()->__('Your sending queue data is being migrated to allow better performance, sending is paused while the migration is in progress and will resume automatically upon completion. This may take a few minutes.') + __('Your sending queue data is being migrated to allow better performance, sending is paused while the migration is in progress and will resume automatically upon completion. This may take a few minutes.') ); return MailerLog::pauseSending($mailerLog); } diff --git a/mailpoet/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php b/mailpoet/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php index 06dd9231cc..487c300da0 100644 --- a/mailpoet/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php +++ b/mailpoet/lib/Cron/Workers/SendingQueue/Tasks/Newsletter.php @@ -192,7 +192,7 @@ class Newsletter { // if the rendered subject is empty, use a default subject, // having no subject in a newsletter is considered spammy if (empty(trim((string)$sendingTask->newsletterRenderedSubject))) { - $sendingTask->newsletterRenderedSubject = WPFunctions::get()->__('No subject', 'mailpoet'); + $sendingTask->newsletterRenderedSubject = __('No subject', 'mailpoet'); } $renderedNewsletter = $this->emoji->encodeEmojisInBody($renderedNewsletter); $sendingTask->newsletterRenderedBody = $renderedNewsletter; @@ -290,7 +290,7 @@ class Newsletter { public function stopNewsletterPreProcessing($errorCode = null) { MailerLog::processError( 'queue_save', - WPFunctions::get()->__('There was an error processing your newsletter during sending. If possible, please contact us and report this issue.', 'mailpoet'), + __('There was an error processing your newsletter during sending. If possible, please contact us and report this issue.', 'mailpoet'), $errorCode ); } diff --git a/mailpoet/lib/Form/AssetsController.php b/mailpoet/lib/Form/AssetsController.php index 5ebf22f868..cd03506bac 100644 --- a/mailpoet/lib/Form/AssetsController.php +++ b/mailpoet/lib/Form/AssetsController.php @@ -87,7 +87,7 @@ class AssetsController { 'is_rtl' => (function_exists('is_rtl') ? (bool)is_rtl() : false), ]); - $ajaxFailedErrorMessage = $this->wp->__('An error has happened while performing a request, please try again later.'); + $ajaxFailedErrorMessage = __('An error has happened while performing a request, please try again later.'); $inlineScript = <<__( + __( 'BEGIN Scripts: you should place them in the header of your theme', 'mailpoet' ) . @@ -89,7 +89,7 @@ class Export { $output[] = ' };'; $output[] = ''; $output[] = ''; $formWidget = new Widget(); diff --git a/mailpoet/lib/Form/Widget.php b/mailpoet/lib/Form/Widget.php index ebba1371c6..b2e9a9acc5 100644 --- a/mailpoet/lib/Form/Widget.php +++ b/mailpoet/lib/Form/Widget.php @@ -31,8 +31,8 @@ class Widget extends \WP_Widget { public function __construct() { parent::__construct( 'mailpoet_form', - WPFunctions::get()->__('MailPoet 3 Form', 'mailpoet'), - ['description' => WPFunctions::get()->__('Add a newsletter subscription form', 'mailpoet')] + __('MailPoet 3 Form', 'mailpoet'), + ['description' => __('Add a newsletter subscription form', 'mailpoet')] ); $this->wp = new WPFunctions; @@ -120,7 +120,7 @@ class Widget extends \WP_Widget { $instance = WPFunctions::get()->wpParseArgs( (array)$instance, [ - 'title' => WPFunctions::get()->__('Subscribe to Our Newsletter', 'mailpoet'), + 'title' => __('Subscribe to Our Newsletter', 'mailpoet'), ] ); @@ -135,7 +135,7 @@ class Widget extends \WP_Widget { // get forms list $forms = $this->formsRepository->findBy(['deletedAt' => null], ['name' => 'asc']); ?>

- + getId(); foreach ($forms as $form) { - $formName = $form->getName() ? $this->wp->escHtml($form->getName()) : "({$this->wp->_x('no name', 'fallback for forms without a name in a form list')})"; + $formName = $form->getName() ? $this->wp->escHtml($form->getName()) : '(' . _x('no name', 'fallback for forms without a name in a form list') . ')'; $formName .= $form->getStatus() === FormEntity::STATUS_DISABLED ? ' (' . __('inactive', 'mailpoet') . ')' : ''; ?> @@ -158,7 +158,7 @@ class Widget extends \WP_Widget {

- __('Create a new form', 'mailpoet')); ?> +

message ? ' ' : ''; if (count($this->subscribersErrors) === 1) { - $message .= WPFunctions::get()->__('Unprocessed subscriber:', 'mailpoet') . ' '; + $message .= __('Unprocessed subscriber:', 'mailpoet') . ' '; } else { - $message .= WPFunctions::get()->__('Unprocessed subscribers:', 'mailpoet') . ' '; + $message .= __('Unprocessed subscribers:', 'mailpoet') . ' '; } $message .= implode( diff --git a/mailpoet/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php b/mailpoet/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php index abc4aca3fd..3e3a487e17 100644 --- a/mailpoet/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php +++ b/mailpoet/lib/Mailer/Methods/ErrorMappers/AmazonSESMapper.php @@ -5,7 +5,6 @@ namespace MailPoet\Mailer\Methods\ErrorMappers; use MailPoet\Mailer\Mailer; use MailPoet\Mailer\MailerError; use MailPoet\Mailer\SubscriberError; -use MailPoet\WP\Functions as WPFunctions; class AmazonSESMapper { use BlacklistErrorMapperTrait; @@ -29,7 +28,7 @@ class AmazonSESMapper { public function getErrorFromResponse($response, $subscriber) { $message = ($response) ? $response->Error->Message->__toString() : // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps - sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES); + sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES); $level = MailerError::LEVEL_HARD; if ($response && $response->Error->Code->__toString() === 'MessageRejected') { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps diff --git a/mailpoet/lib/Mailer/Methods/ErrorMappers/BlacklistErrorMapperTrait.php b/mailpoet/lib/Mailer/Methods/ErrorMappers/BlacklistErrorMapperTrait.php index cdc4ba746d..df97119a06 100644 --- a/mailpoet/lib/Mailer/Methods/ErrorMappers/BlacklistErrorMapperTrait.php +++ b/mailpoet/lib/Mailer/Methods/ErrorMappers/BlacklistErrorMapperTrait.php @@ -4,11 +4,10 @@ namespace MailPoet\Mailer\Methods\ErrorMappers; use MailPoet\Mailer\MailerError; use MailPoet\Mailer\SubscriberError; -use MailPoet\WP\Functions as WPFunctions; trait BlacklistErrorMapperTrait { public function getBlacklistError($subscriber) { - $message = sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), self::METHOD); + $message = sprintf(__('%s has returned an unknown error.', 'mailpoet'), self::METHOD); $subscriberErrors = [new SubscriberError($subscriber, null)]; return new MailerError(MailerError::OPERATION_SEND, MailerError::LEVEL_SOFT, $message, null, $subscriberErrors); } diff --git a/mailpoet/lib/Mailer/Methods/ErrorMappers/PHPMailerMapper.php b/mailpoet/lib/Mailer/Methods/ErrorMappers/PHPMailerMapper.php index c20751da2b..e9149a1700 100644 --- a/mailpoet/lib/Mailer/Methods/ErrorMappers/PHPMailerMapper.php +++ b/mailpoet/lib/Mailer/Methods/ErrorMappers/PHPMailerMapper.php @@ -4,7 +4,6 @@ namespace MailPoet\Mailer\Methods\ErrorMappers; use MailPoet\Mailer\MailerError; use MailPoet\Mailer\SubscriberError; -use MailPoet\WP\Functions as WPFunctions; abstract class PHPMailerMapper { use ConnectionErrorMapperTrait; @@ -20,7 +19,7 @@ abstract class PHPMailerMapper { } public function getErrorForSubscriber($subscriber) { - $message = sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), $this->getMethodName()); + $message = sprintf(__('%s has returned an unknown error.', 'mailpoet'), $this->getMethodName()); $subscriberErrors = [new SubscriberError($subscriber, null)]; return new MailerError(MailerError::OPERATION_SEND, MailerError::LEVEL_HARD, $message, null, $subscriberErrors); } diff --git a/mailpoet/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php b/mailpoet/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php index 656877a2e8..9c7d9d2092 100644 --- a/mailpoet/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php +++ b/mailpoet/lib/Mailer/Methods/ErrorMappers/SendGridMapper.php @@ -5,7 +5,6 @@ namespace MailPoet\Mailer\Methods\ErrorMappers; use MailPoet\Mailer\Mailer; use MailPoet\Mailer\MailerError; use MailPoet\Mailer\SubscriberError; -use MailPoet\WP\Functions as WPFunctions; class SendGridMapper { use BlacklistErrorMapperTrait; @@ -16,7 +15,7 @@ class SendGridMapper { public function getErrorFromResponse($response, $subscriber) { $response = (!empty($response['errors'][0])) ? $response['errors'][0] : - sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_SENDGRID); + sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_SENDGRID); $level = MailerError::LEVEL_HARD; if (strpos($response, 'Invalid email address') === 0) { diff --git a/mailpoet/lib/Models/CustomField.php b/mailpoet/lib/Models/CustomField.php index 40d13264f9..1575e7f9e1 100644 --- a/mailpoet/lib/Models/CustomField.php +++ b/mailpoet/lib/Models/CustomField.php @@ -4,7 +4,6 @@ namespace MailPoet\Models; use MailPoet\Entities\CustomFieldEntity; use MailPoet\Util\DateConverter; -use MailPoet\WP\Functions as WPFunctions; /** * @property string $name @@ -24,10 +23,10 @@ class CustomField extends Model { public function __construct() { parent::__construct(); $this->addValidations('name', [ - 'required' => WPFunctions::get()->__('Please specify a name.', 'mailpoet'), + 'required' => __('Please specify a name.', 'mailpoet'), ]); $this->addValidations('type', [ - 'required' => WPFunctions::get()->__('Please specify a type.', 'mailpoet'), + 'required' => __('Please specify a type.', 'mailpoet'), ]); } diff --git a/mailpoet/lib/Models/Model.php b/mailpoet/lib/Models/Model.php index 80e1f00c95..6405baac3f 100644 --- a/mailpoet/lib/Models/Model.php +++ b/mailpoet/lib/Models/Model.php @@ -3,7 +3,6 @@ namespace MailPoet\Models; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; /** * @method static array|string getConfig($key = null, $connection_name = self::DEFAULT_CONNECTION) @@ -241,7 +240,7 @@ class Model extends \MailPoetVendor\Sudzy\ValidModel { $column = $matches[1]; $this->setError( sprintf( - WPFunctions::get()->__('Another record already exists. Please specify a different "%1$s".', 'mailpoet'), + __('Another record already exists. Please specify a different "%1$s".', 'mailpoet'), $column ), Model::DUPLICATE_RECORD diff --git a/mailpoet/lib/Models/Newsletter.php b/mailpoet/lib/Models/Newsletter.php index 572eb30934..365bd38eed 100644 --- a/mailpoet/lib/Models/Newsletter.php +++ b/mailpoet/lib/Models/Newsletter.php @@ -10,7 +10,6 @@ use MailPoet\Settings\SettingsController; use MailPoet\Tasks\Sending as SendingTask; use MailPoet\Util\Helpers; use MailPoet\Util\Security; -use MailPoet\WP\Functions as WPFunctions; /** * @property int $id @@ -63,7 +62,7 @@ class Newsletter extends Model { public function __construct() { parent::__construct(); $this->addValidations('type', [ - 'required' => WPFunctions::get()->__('Please specify a type.', 'mailpoet'), + 'required' => __('Please specify a type.', 'mailpoet'), ]); } @@ -338,7 +337,7 @@ class Newsletter extends Model { foreach ($links as $link) { $deletedSegments[] = [ 'id' => $link['segment_id'], - 'name' => WPFunctions::get()->__('Deleted list', 'mailpoet'), + 'name' => __('Deleted list', 'mailpoet'), ]; } $this->segments = array_merge($this->segments, $deletedSegments); diff --git a/mailpoet/lib/Models/NewsletterOptionField.php b/mailpoet/lib/Models/NewsletterOptionField.php index 7b94fd144a..43f9d8003d 100644 --- a/mailpoet/lib/Models/NewsletterOptionField.php +++ b/mailpoet/lib/Models/NewsletterOptionField.php @@ -2,8 +2,6 @@ namespace MailPoet\Models; -use MailPoet\WP\Functions as WPFunctions; - /** * @property string $name * @property string $newsletterType @@ -21,10 +19,10 @@ class NewsletterOptionField extends Model { self::deprecationError(__METHOD__); parent::__construct(); $this->addValidations('name', [ - 'required' => WPFunctions::get()->__('Please specify a name.', 'mailpoet'), + 'required' => __('Please specify a name.', 'mailpoet'), ]); $this->addValidations('newsletter_type', [ - 'required' => WPFunctions::get()->__('Please specify a newsletter type.', 'mailpoet'), + 'required' => __('Please specify a newsletter type.', 'mailpoet'), ]); } diff --git a/mailpoet/lib/Models/Segment.php b/mailpoet/lib/Models/Segment.php index bbd119b66f..4c86ef7a2d 100644 --- a/mailpoet/lib/Models/Segment.php +++ b/mailpoet/lib/Models/Segment.php @@ -4,7 +4,6 @@ namespace MailPoet\Models; use MailPoet\Entities\SegmentEntity; use MailPoet\WooCommerce\Helper as WCHelper; -use MailPoet\WP\Functions as WPFunctions; /** * @property array $subscribersCount @@ -26,7 +25,7 @@ class Segment extends Model { parent::__construct(); $this->addValidations('name', [ - 'required' => WPFunctions::get()->__('Please specify a name.', 'mailpoet'), + 'required' => __('Please specify a name.', 'mailpoet'), ]); } @@ -138,9 +137,9 @@ class Segment extends Model { // create the wp users segment $wpSegment = Segment::create(); $wpSegment->hydrate([ - 'name' => WPFunctions::get()->__('WordPress Users', 'mailpoet'), + 'name' => __('WordPress Users', 'mailpoet'), 'description' => - WPFunctions::get()->__('This list contains all of your WordPress users.', 'mailpoet'), + __('This list contains all of your WordPress users.', 'mailpoet'), 'type' => self::TYPE_WP_USERS, ]); $wpSegment->save(); @@ -156,9 +155,9 @@ class Segment extends Model { // create the WooCommerce customers segment $wcSegment = Segment::create(); $wcSegment->hydrate([ - 'name' => WPFunctions::get()->__('WooCommerce Customers', 'mailpoet'), + 'name' => __('WooCommerce Customers', 'mailpoet'), 'description' => - WPFunctions::get()->__('This list contains all of your WooCommerce customers.', 'mailpoet'), + __('This list contains all of your WooCommerce customers.', 'mailpoet'), 'type' => self::TYPE_WC_USERS, ]); $wcSegment->save(); @@ -267,7 +266,7 @@ class Segment extends Model { 'AND subscribers.deleted_at IS NULL ' . 'GROUP BY segments.id) ' . 'UNION ALL ' . - '(SELECT 0 as id, "' . WPFunctions::get()->__('Subscribers without a list', 'mailpoet') . '" as name, COUNT(*) as subscribers ' . + '(SELECT 0 as id, "' . __('Subscribers without a list', 'mailpoet') . '" as name, COUNT(*) as subscribers ' . 'FROM ' . MP_SUBSCRIBERS_TABLE . ' subscribers ' . 'LEFT JOIN ' . MP_SUBSCRIBER_SEGMENT_TABLE . ' relation on relation.subscriber_id = subscribers.id ' . 'WHERE relation.subscriber_id is NULL ' . diff --git a/mailpoet/lib/Models/SendingQueue.php b/mailpoet/lib/Models/SendingQueue.php index a3f91a6727..164327ea61 100644 --- a/mailpoet/lib/Models/SendingQueue.php +++ b/mailpoet/lib/Models/SendingQueue.php @@ -4,7 +4,6 @@ namespace MailPoet\Models; use MailPoet\Entities\SendingQueueEntity; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; /** * @property int $countProcessed @@ -34,7 +33,7 @@ class SendingQueue extends Model { parent::__construct(); $this->addValidations('newsletter_rendered_body', [ - 'validRenderedNewsletterBody' => WPFunctions::get()->__('Rendered newsletter body is invalid!', 'mailpoet'), + 'validRenderedNewsletterBody' => __('Rendered newsletter body is invalid!', 'mailpoet'), ]); } diff --git a/mailpoet/lib/Models/Subscriber.php b/mailpoet/lib/Models/Subscriber.php index 3ddb21414b..9b76803f76 100644 --- a/mailpoet/lib/Models/Subscriber.php +++ b/mailpoet/lib/Models/Subscriber.php @@ -48,8 +48,8 @@ class Subscriber extends Model { parent::__construct(); $this->addValidations('email', [ - 'required' => WPFunctions::get()->__('Please enter your email address', 'mailpoet'), - 'validEmail' => WPFunctions::get()->__('Your email address is invalid!', 'mailpoet'), + 'required' => __('Please enter your email address', 'mailpoet'), + 'validEmail' => __('Your email address is invalid!', 'mailpoet'), ]); } @@ -160,7 +160,7 @@ class Subscriber extends Model { ->findMany(); $segmentList = []; $segmentList[] = [ - 'label' => WPFunctions::get()->__('All Lists', 'mailpoet'), + 'label' => __('All Lists', 'mailpoet'), 'value' => '', ]; diff --git a/mailpoet/lib/Newsletter/Listing/NewsletterListingRepository.php b/mailpoet/lib/Newsletter/Listing/NewsletterListingRepository.php index 86bf6a089b..4488446464 100644 --- a/mailpoet/lib/Newsletter/Listing/NewsletterListingRepository.php +++ b/mailpoet/lib/Newsletter/Listing/NewsletterListingRepository.php @@ -6,7 +6,6 @@ use MailPoet\Entities\NewsletterEntity; use MailPoet\Listing\ListingDefinition; use MailPoet\Listing\ListingRepository; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; use MailPoetVendor\Doctrine\ORM\QueryBuilder; class NewsletterListingRepository extends ListingRepository { @@ -60,7 +59,7 @@ class NewsletterListingRepository extends ListingRepository { // format segment list $segmentList = [ [ - 'label' => WPFunctions::get()->__('All Lists', 'mailpoet'), + 'label' => __('All Lists', 'mailpoet'), 'value' => '', ], ]; @@ -104,7 +103,7 @@ class NewsletterListingRepository extends ListingRepository { $groups = [ [ 'name' => 'all', - 'label' => WPFunctions::get()->__('All', 'mailpoet'), + 'label' => __('All', 'mailpoet'), 'count' => $totalCount, ], ]; @@ -115,22 +114,22 @@ class NewsletterListingRepository extends ListingRepository { $groups = array_merge($groups, [ [ 'name' => NewsletterEntity::STATUS_DRAFT, - 'label' => WPFunctions::get()->__('Draft', 'mailpoet'), + 'label' => __('Draft', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_DRAFT] ?? 0, ], [ 'name' => NewsletterEntity::STATUS_SCHEDULED, - 'label' => WPFunctions::get()->__('Scheduled', 'mailpoet'), + 'label' => __('Scheduled', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_SCHEDULED] ?? 0, ], [ 'name' => NewsletterEntity::STATUS_SENDING, - 'label' => WPFunctions::get()->__('Sending', 'mailpoet'), + 'label' => __('Sending', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_SENDING] ?? 0, ], [ 'name' => NewsletterEntity::STATUS_SENT, - 'label' => WPFunctions::get()->__('Sent', 'mailpoet'), + 'label' => __('Sent', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_SENT] ?? 0, ], ]); @@ -140,12 +139,12 @@ class NewsletterListingRepository extends ListingRepository { $groups = array_merge($groups, [ [ 'name' => NewsletterEntity::STATUS_SENDING, - 'label' => WPFunctions::get()->__('Sending', 'mailpoet'), + 'label' => __('Sending', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_SENDING] ?? 0, ], [ 'name' => NewsletterEntity::STATUS_SENT, - 'label' => WPFunctions::get()->__('Sent', 'mailpoet'), + 'label' => __('Sent', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_SENT] ?? 0, ], ]); @@ -158,12 +157,12 @@ class NewsletterListingRepository extends ListingRepository { $groups = array_merge($groups, [ [ 'name' => NewsletterEntity::STATUS_ACTIVE, - 'label' => WPFunctions::get()->__('Active', 'mailpoet'), + 'label' => __('Active', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_ACTIVE] ?? 0, ], [ 'name' => NewsletterEntity::STATUS_DRAFT, - 'label' => WPFunctions::get()->__('Not active', 'mailpoet'), + 'label' => __('Not active', 'mailpoet'), 'count' => $map[NewsletterEntity::STATUS_DRAFT] ?? 0, ], ]); @@ -172,7 +171,7 @@ class NewsletterListingRepository extends ListingRepository { $groups[] = [ 'name' => 'trash', - 'label' => WPFunctions::get()->__('Trash', 'mailpoet'), + 'label' => __('Trash', 'mailpoet'), 'count' => $trashedCount, ]; diff --git a/mailpoet/lib/Router/Router.php b/mailpoet/lib/Router/Router.php index 57715fe969..1e56e0e0c8 100644 --- a/mailpoet/lib/Router/Router.php +++ b/mailpoet/lib/Router/Router.php @@ -45,16 +45,16 @@ class Router { $endpointClass = __NAMESPACE__ . "\\Endpoints\\" . ucfirst($this->endpoint); if (!$this->endpoint || !class_exists($endpointClass)) { - return $this->terminateRequest(self::RESPONSE_ERROR, WPFunctions::get()->__('Invalid router endpoint', 'mailpoet')); + return $this->terminateRequest(self::RESPONSE_ERROR, __('Invalid router endpoint', 'mailpoet')); } $endpoint = $this->container->get($endpointClass); if (!method_exists($endpoint, $this->endpointAction) || !in_array($this->endpointAction, $endpoint->allowedActions)) { - return $this->terminateRequest(self::RESPONSE_ERROR, WPFunctions::get()->__('Invalid router endpoint action', 'mailpoet')); + return $this->terminateRequest(self::RESPONSE_ERROR, __('Invalid router endpoint action', 'mailpoet')); } if (!$this->validatePermissions($this->endpointAction, $endpoint->permissions)) { - return $this->terminateRequest(self::RESPONE_FORBIDDEN, WPFunctions::get()->__('You do not have the required permissions.', 'mailpoet')); + return $this->terminateRequest(self::RESPONE_FORBIDDEN, __('You do not have the required permissions.', 'mailpoet')); } WPFunctions::get()->doAction('mailpoet_conflict_resolver_router_url_query_parameters'); $callback = [ diff --git a/mailpoet/lib/Segments/SegmentDependencyValidator.php b/mailpoet/lib/Segments/SegmentDependencyValidator.php index 641e855fe3..bd4b41e568 100644 --- a/mailpoet/lib/Segments/SegmentDependencyValidator.php +++ b/mailpoet/lib/Segments/SegmentDependencyValidator.php @@ -142,7 +142,7 @@ class SegmentDependencyValidator { && (!$this->subscribersFeature->hasValidPremiumKey() || $this->subscribersFeature->check()) ) { return [ - 'message' => $this->wp->__('Your current MailPoet plan does not support advanced segments. Please [link]upgrade to a MailPoet Premium plan[/link] to reactivate this segment.', 'mailpoet'), + 'message' => __('Your current MailPoet plan does not support advanced segments. Please [link]upgrade to a MailPoet Premium plan[/link] to reactivate this segment.', 'mailpoet'), 'link' => 'https://account.mailpoet.com', ]; } diff --git a/mailpoet/lib/Segments/SegmentsRepository.php b/mailpoet/lib/Segments/SegmentsRepository.php index 47d12e0408..2528c4e16b 100644 --- a/mailpoet/lib/Segments/SegmentsRepository.php +++ b/mailpoet/lib/Segments/SegmentsRepository.php @@ -57,9 +57,9 @@ class SegmentsRepository extends Repository { if (!$segment) { // create the WooCommerce customers segment $segment = new SegmentEntity( - WPFunctions::get()->__('WooCommerce Customers', 'mailpoet'), + __('WooCommerce Customers', 'mailpoet'), SegmentEntity::TYPE_WC_USERS, - WPFunctions::get()->__('This list contains all of your WooCommerce customers.', 'mailpoet') + __('This list contains all of your WooCommerce customers.', 'mailpoet') ); $this->entityManager->persist($segment); $this->entityManager->flush(); diff --git a/mailpoet/lib/Services/Bridge/API.php b/mailpoet/lib/Services/Bridge/API.php index e2fb3861a4..e6f7022d43 100644 --- a/mailpoet/lib/Services/Bridge/API.php +++ b/mailpoet/lib/Services/Bridge/API.php @@ -206,7 +206,7 @@ class API { $this->loggerFactory->getLogger(LoggerFactory::TOPIC_BRIDGE)->error('CreateAuthorizedEmailAddress API call failed.', $logData); $errorResponseData = json_decode($errorBody, true); - $fallbackError = sprintf($this->wp->__('An error has happened while performing a request, the server has responded with response code %d'), $code); + $fallbackError = sprintf(__('An error has happened while performing a request, the server has responded with response code %d'), $code); $errorData = is_array($errorResponseData) && isset($errorResponseData['error']) ? $errorResponseData['error'] : $fallbackError; return ['error' => $errorData, 'status' => false]; diff --git a/mailpoet/lib/Settings/Pages.php b/mailpoet/lib/Settings/Pages.php index c80fa78ef7..a61063a646 100644 --- a/mailpoet/lib/Settings/Pages.php +++ b/mailpoet/lib/Settings/Pages.php @@ -12,8 +12,8 @@ class Pages { public function init() { WPFunctions::get()->registerPostType('mailpoet_page', [ 'labels' => [ - 'name' => WPFunctions::get()->__('MailPoet Page', 'mailpoet'), - 'singular_name' => WPFunctions::get()->__('MailPoet Page', 'mailpoet'), + 'name' => __('MailPoet Page', 'mailpoet'), + 'singular_name' => __('MailPoet Page', 'mailpoet'), ], 'public' => true, 'has_archive' => false, @@ -37,7 +37,7 @@ class Pages { 'post_type' => 'mailpoet_page', 'post_author' => 1, 'post_content' => '[mailpoet_page]', - 'post_title' => WPFunctions::get()->__('MailPoet Page', 'mailpoet'), + 'post_title' => __('MailPoet Page', 'mailpoet'), 'post_name' => 'subscriptions', ]); diff --git a/mailpoet/lib/Settings/SettingsController.php b/mailpoet/lib/Settings/SettingsController.php index 83f1d75b37..7dff437f77 100644 --- a/mailpoet/lib/Settings/SettingsController.php +++ b/mailpoet/lib/Settings/SettingsController.php @@ -68,7 +68,7 @@ class SettingsController { 'signup_confirmation' => [ 'enabled' => true, 'subject' => sprintf(__('Confirm your subscription to %1$s', 'mailpoet'), WPFunctions::get()->getOption('blogname')), - 'body' => WPFunctions::get()->__("Hello,\n\nWelcome to our newsletter!\n\nPlease confirm your subscription to our list by clicking the link below: \n\n[activation_link]I confirm my subscription![/activation_link]\n\nThank you,\n\nThe Team", 'mailpoet'), + 'body' => __("Hello,\n\nWelcome to our newsletter!\n\nPlease confirm your subscription to our list by clicking the link below: \n\n[activation_link]I confirm my subscription![/activation_link]\n\nThank you,\n\nThe Team", 'mailpoet'), ], 'tracking' => [ 'level' => TrackingConfig::LEVEL_FULL, diff --git a/mailpoet/lib/Subscribers/ImportExport/Import/MailChimp.php b/mailpoet/lib/Subscribers/ImportExport/Import/MailChimp.php index 3d78110202..e25593fb44 100644 --- a/mailpoet/lib/Subscribers/ImportExport/Import/MailChimp.php +++ b/mailpoet/lib/Subscribers/ImportExport/Import/MailChimp.php @@ -3,7 +3,6 @@ namespace MailPoet\Subscribers\ImportExport\Import; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; class MailChimp { private const API_BASE_URI = 'https://user:%s@%s.api.mailchimp.com/3.0/'; @@ -134,19 +133,19 @@ class MailChimp { * @throws \Exception */ public function throwException(string $error): void { - $errorMessage = WPFunctions::get()->__('Unknown MailChimp error.', 'mailpoet'); + $errorMessage = __('Unknown MailChimp error.', 'mailpoet'); switch ($error) { case 'API': - $errorMessage = WPFunctions::get()->__('Invalid API Key.', 'mailpoet'); + $errorMessage = __('Invalid API Key.', 'mailpoet'); break; case 'size': - $errorMessage = WPFunctions::get()->__('The information received from MailChimp is too large for processing. Please limit the number of lists!', 'mailpoet'); + $errorMessage = __('The information received from MailChimp is too large for processing. Please limit the number of lists!', 'mailpoet'); break; case 'subscribers': - $errorMessage = WPFunctions::get()->__('Did not find any active subscribers.', 'mailpoet'); + $errorMessage = __('Did not find any active subscribers.', 'mailpoet'); break; case 'lists': - $errorMessage = WPFunctions::get()->__('Did not find any valid lists.', 'mailpoet'); + $errorMessage = __('Did not find any valid lists.', 'mailpoet'); break; } throw new \Exception($errorMessage); diff --git a/mailpoet/lib/Subscribers/ImportExport/ImportExportRepository.php b/mailpoet/lib/Subscribers/ImportExport/ImportExportRepository.php index e17d1eb6d7..4aedcdbd48 100644 --- a/mailpoet/lib/Subscribers/ImportExport/ImportExportRepository.php +++ b/mailpoet/lib/Subscribers/ImportExport/ImportExportRepository.php @@ -9,7 +9,6 @@ use MailPoet\Entities\SubscriberCustomFieldEntity; use MailPoet\Entities\SubscriberEntity; use MailPoet\Entities\SubscriberSegmentEntity; use MailPoet\Segments\DynamicSegments\FilterHandler; -use MailPoet\WP\Functions as WPFunctions; use MailPoetVendor\Doctrine\DBAL\Connection; use MailPoetVendor\Doctrine\DBAL\Driver\Statement; use MailPoetVendor\Doctrine\DBAL\Query\QueryBuilder; @@ -182,7 +181,7 @@ class ImportExportRepository { if (!$segment) { // if there are subscribers who do not belong to any segment, use // a CASE function to group them under "Not In Segment" - $qb->addSelect("'" . WPFunctions::get()->__('Not In Segment', 'mailpoet') . "' AS segment_name") + $qb->addSelect("'" . __('Not In Segment', 'mailpoet') . "' AS segment_name") ->leftJoin($subscriberTable, $subscriberTable, 's2', "{$subscriberTable}.id = s2.id") ->leftJoin('s2', $subscriberSegmentTable, 'ssg2', "s2.id = ssg2.subscriber_id AND ssg2.status = :statusSubscribed AND {$segmentTable}.id <> ssg2.segment_id") ->leftJoin('ssg2', $segmentTable, 'sg2', 'ssg2.segment_id = sg2.id AND sg2.deleted_at IS NULL') diff --git a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php index 51f1bdc3fb..4a6a160d68 100644 --- a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php +++ b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php @@ -3,7 +3,6 @@ namespace MailPoet\Subscribers\ImportExport\PersonalDataExporters; use MailPoet\Statistics\StatisticsClicksRepository; -use MailPoet\WP\Functions as WPFunctions; class NewsletterClicksExporter extends NewsletterStatsBaseExporter { protected $statsClassName = StatisticsClicksRepository::class; @@ -11,32 +10,32 @@ class NewsletterClicksExporter extends NewsletterStatsBaseExporter { protected function getEmailStats(array $row) { $newsletterData = []; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Email subject', 'mailpoet'), + 'name' => __('Email subject', 'mailpoet'), 'value' => $row['newsletterRenderedSubject'], ]; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Timestamp of the click event', 'mailpoet'), + 'name' => __('Timestamp of the click event', 'mailpoet'), 'value' => $row['createdAt']->format("Y-m-d H:i:s"), ]; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('URL', 'mailpoet'), + 'name' => __('URL', 'mailpoet'), 'value' => $row['url'], ]; if (!is_null($row['userAgent'])) { $userAgent = $row['userAgent']; } else { - $userAgent = WPFunctions::get()->__('Unknown', 'mailpoet'); + $userAgent = __('Unknown', 'mailpoet'); } $newsletterData[] = [ - 'name' => WPFunctions::get()->__('User-agent', 'mailpoet'), + 'name' => __('User-agent', 'mailpoet'), 'value' => $userAgent, ]; return [ 'group_id' => 'mailpoet-newsletter-clicks', - 'group_label' => WPFunctions::get()->__('MailPoet Emails Clicks', 'mailpoet'), + 'group_label' => __('MailPoet Emails Clicks', 'mailpoet'), 'item_id' => 'newsletter-' . $row['id'], 'data' => $newsletterData, ]; diff --git a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterOpensExporter.php b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterOpensExporter.php index ac81f74b0f..e1fe26407d 100644 --- a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterOpensExporter.php +++ b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterOpensExporter.php @@ -3,7 +3,6 @@ namespace MailPoet\Subscribers\ImportExport\PersonalDataExporters; use MailPoet\Statistics\StatisticsOpensRepository; -use MailPoet\WP\Functions as WPFunctions; class NewsletterOpensExporter extends NewsletterStatsBaseExporter { protected $statsClassName = StatisticsOpensRepository::class; @@ -11,28 +10,28 @@ class NewsletterOpensExporter extends NewsletterStatsBaseExporter { protected function getEmailStats(array $row): array { $newsletterData = []; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Email subject', 'mailpoet'), + 'name' => __('Email subject', 'mailpoet'), 'value' => $row['newsletterRenderedSubject'], ]; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Timestamp of the open event', 'mailpoet'), + 'name' => __('Timestamp of the open event', 'mailpoet'), 'value' => $row['createdAt']->format("Y-m-d H:i:s"), ]; if (!is_null($row['userAgent'])) { $userAgent = $row['userAgent']; } else { - $userAgent = WPFunctions::get()->__('Unknown', 'mailpoet'); + $userAgent = __('Unknown', 'mailpoet'); } $newsletterData[] = [ - 'name' => WPFunctions::get()->__('User-agent', 'mailpoet'), + 'name' => __('User-agent', 'mailpoet'), 'value' => $userAgent, ]; return [ 'group_id' => 'mailpoet-newsletter-opens', - 'group_label' => WPFunctions::get()->__('MailPoet Emails Opens', 'mailpoet'), + 'group_label' => __('MailPoet Emails Opens', 'mailpoet'), 'item_id' => 'newsletter-' . $row['id'], 'data' => $newsletterData, ]; diff --git a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php index eca6dc399d..86f8f806ed 100644 --- a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php +++ b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php @@ -8,7 +8,6 @@ use MailPoet\Newsletter\Statistics\NewsletterStatisticsRepository; use MailPoet\Newsletter\Url as NewsletterUrl; use MailPoet\Subscribers\SubscribersRepository; use MailPoet\WP\DateTime; -use MailPoet\WP\Functions as WPFunctions; class NewslettersExporter { @@ -69,33 +68,33 @@ class NewslettersExporter { private function exportNewsletter($statisticsRow, $newsletters, $subscriber) { $newsletterData = []; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Email subject', 'mailpoet'), + 'name' => __('Email subject', 'mailpoet'), 'value' => $statisticsRow['newsletter_rendered_subject'], ]; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Sent at', 'mailpoet'), + 'name' => __('Sent at', 'mailpoet'), 'value' => $statisticsRow['sent_at'] ? $statisticsRow['sent_at']->format(DateTime::DEFAULT_DATE_TIME_FORMAT) : '', ]; if (!empty($statisticsRow['opened_at'])) { $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Opened', 'mailpoet'), + 'name' => __('Opened', 'mailpoet'), 'value' => 'Yes', ]; $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Opened at', 'mailpoet'), + 'name' => __('Opened at', 'mailpoet'), 'value' => $statisticsRow['opened_at']->format(DateTime::DEFAULT_DATE_TIME_FORMAT), ]; } else { $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Opened', 'mailpoet'), - 'value' => WPFunctions::get()->__('No', 'mailpoet'), + 'name' => __('Opened', 'mailpoet'), + 'value' => __('No', 'mailpoet'), ]; } if (isset($newsletters[$statisticsRow['newsletter_id']])) { $newsletterData[] = [ - 'name' => WPFunctions::get()->__('Email preview', 'mailpoet'), + 'name' => __('Email preview', 'mailpoet'), 'value' => $this->newsletterUrl->getViewInBrowserUrl( $newsletters[$statisticsRow['newsletter_id']], $subscriber @@ -104,7 +103,7 @@ class NewslettersExporter { } return [ 'group_id' => 'mailpoet-newsletters', - 'group_label' => WPFunctions::get()->__('MailPoet Emails Sent', 'mailpoet'), + 'group_label' => __('MailPoet Emails Sent', 'mailpoet'), 'item_id' => 'newsletter-' . $statisticsRow['newsletter_id'], 'data' => $newsletterData, ]; diff --git a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php index 18ef41d122..dfcdd85437 100644 --- a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php +++ b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporter.php @@ -6,7 +6,6 @@ use MailPoet\Entities\SubscriberEntity; use MailPoet\Entities\SubscriberSegmentEntity; use MailPoet\Subscribers\SubscribersRepository; use MailPoet\WP\DateTime; -use MailPoet\WP\Functions as WPFunctions; class SegmentsExporter { @@ -54,20 +53,20 @@ class SegmentsExporter { private function exportSegment(SubscriberSegmentEntity $segment): array { $segmentData = []; $segmentData[] = [ - 'name' => WPFunctions::get()->__('List name', 'mailpoet'), + 'name' => __('List name', 'mailpoet'), 'value' => $segment->getSegment() ? $segment->getSegment()->getName() : '', ]; $segmentData[] = [ - 'name' => WPFunctions::get()->__('Subscription status', 'mailpoet'), + 'name' => __('Subscription status', 'mailpoet'), 'value' => $segment->getStatus(), ]; $segmentData[] = [ - 'name' => WPFunctions::get()->__('Timestamp of the subscription (or last change of the subscription status)', 'mailpoet'), + 'name' => __('Timestamp of the subscription (or last change of the subscription status)', 'mailpoet'), 'value' => $segment->getUpdatedAt()->format(DateTime::DEFAULT_DATE_TIME_FORMAT), ]; return [ 'group_id' => 'mailpoet-lists', - 'group_label' => WPFunctions::get()->__('MailPoet Mailing Lists', 'mailpoet'), + 'group_label' => __('MailPoet Mailing Lists', 'mailpoet'), 'item_id' => 'list-' . ($segment->getSegment() ? $segment->getSegment()->getId() : ''), 'data' => $segmentData, ]; diff --git a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php index 881b359c8b..6a1c1a22c7 100644 --- a/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php +++ b/mailpoet/lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php @@ -7,7 +7,6 @@ use MailPoet\Entities\SubscriberEntity; use MailPoet\Subscribers\Source; use MailPoet\Subscribers\SubscribersRepository; use MailPoet\WP\DateTime; -use MailPoet\WP\Functions as WPFunctions; class SubscriberExporter { /*** @var SubscribersRepository */ @@ -46,7 +45,7 @@ class SubscriberExporter { if (!$subscriber) return []; return [[ 'group_id' => 'mailpoet-subscriber', - 'group_label' => WPFunctions::get()->__('MailPoet Subscriber Data', 'mailpoet'), + 'group_label' => __('MailPoet Subscriber Data', 'mailpoet'), 'item_id' => 'subscriber-' . $subscriber->getId(), 'data' => $this->getSubscriberExportData($subscriber), ]]; @@ -60,36 +59,36 @@ class SubscriberExporter { $customFields = $this->getCustomFields(); $result = [ [ - 'name' => WPFunctions::get()->__('First Name', 'mailpoet'), + 'name' => __('First Name', 'mailpoet'), 'value' => $subscriber->getFirstName(), ], [ - 'name' => WPFunctions::get()->__('Last Name', 'mailpoet'), + 'name' => __('Last Name', 'mailpoet'), 'value' => $subscriber->getLastName(), ], [ - 'name' => WPFunctions::get()->__('Email', 'mailpoet'), + 'name' => __('Email', 'mailpoet'), 'value' => $subscriber->getEmail(), ], [ - 'name' => WPFunctions::get()->__('Status', 'mailpoet'), + 'name' => __('Status', 'mailpoet'), 'value' => $subscriber->getStatus(), ], ]; if ($subscriber->getSubscribedIp()) { $result[] = [ - 'name' => WPFunctions::get()->__('Subscribed IP', 'mailpoet'), + 'name' => __('Subscribed IP', 'mailpoet'), 'value' => $subscriber->getSubscribedIp(), ]; } if ($subscriber->getConfirmedIp()) { $result[] = [ - 'name' => WPFunctions::get()->__('Confirmed IP', 'mailpoet'), + 'name' => __('Confirmed IP', 'mailpoet'), 'value' => $subscriber->getConfirmedIp(), ]; } $result[] = [ - 'name' => WPFunctions::get()->__('Created at', 'mailpoet'), + 'name' => __('Created at', 'mailpoet'), 'value' => $subscriber->getCreatedAt() ? $subscriber->getCreatedAt()->format(DateTime::DEFAULT_DATE_TIME_FORMAT) : '', @@ -105,7 +104,7 @@ class SubscriberExporter { } $result[] = [ - 'name' => WPFunctions::get()->__("Subscriber's subscription source", 'mailpoet'), + 'name' => __("Subscriber's subscription source", 'mailpoet'), 'value' => $this->formatSource($subscriber->getSource()), ]; @@ -130,17 +129,17 @@ class SubscriberExporter { private function formatSource(string $source): string { switch ($source) { case Source::WORDPRESS_USER: - return WPFunctions::get()->__('Subscriber information synchronized via WP user sync', 'mailpoet'); + return __('Subscriber information synchronized via WP user sync', 'mailpoet'); case Source::FORM: - return WPFunctions::get()->__('Subscription via a MailPoet subscription form', 'mailpoet'); + return __('Subscription via a MailPoet subscription form', 'mailpoet'); case Source::API: - return WPFunctions::get()->__('Added by a 3rd party via MailPoet 3 API', 'mailpoet'); + return __('Added by a 3rd party via MailPoet 3 API', 'mailpoet'); case Source::ADMINISTRATOR: - return WPFunctions::get()->__('Created by the administrator', 'mailpoet'); + return __('Created by the administrator', 'mailpoet'); case Source::IMPORTED: - return WPFunctions::get()->__('Imported by the administrator', 'mailpoet'); + return __('Imported by the administrator', 'mailpoet'); default: - return WPFunctions::get()->__('Unknown', 'mailpoet'); + return __('Unknown', 'mailpoet'); } } } diff --git a/mailpoet/lib/Subscribers/SubscriberListingRepository.php b/mailpoet/lib/Subscribers/SubscriberListingRepository.php index e35cc97c4d..d126928726 100644 --- a/mailpoet/lib/Subscribers/SubscriberListingRepository.php +++ b/mailpoet/lib/Subscribers/SubscriberListingRepository.php @@ -10,7 +10,6 @@ use MailPoet\Listing\ListingRepository; use MailPoet\Segments\DynamicSegments\FilterHandler; use MailPoet\Segments\SegmentSubscribersRepository; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; use MailPoetVendor\Doctrine\DBAL\Driver\Statement; use MailPoetVendor\Doctrine\DBAL\Query\QueryBuilder as DBALQueryBuilder; use MailPoetVendor\Doctrine\ORM\EntityManager; @@ -198,37 +197,37 @@ class SubscriberListingRepository extends ListingRepository { return [ [ 'name' => 'all', - 'label' => WPFunctions::get()->__('All', 'mailpoet'), + 'label' => __('All', 'mailpoet'), 'count' => $totalCount, ], [ 'name' => SubscriberEntity::STATUS_SUBSCRIBED, - 'label' => WPFunctions::get()->__('Subscribed', 'mailpoet'), + 'label' => __('Subscribed', 'mailpoet'), 'count' => $groupCounts[SubscriberEntity::STATUS_SUBSCRIBED], ], [ 'name' => SubscriberEntity::STATUS_UNCONFIRMED, - 'label' => WPFunctions::get()->__('Unconfirmed', 'mailpoet'), + 'label' => __('Unconfirmed', 'mailpoet'), 'count' => $groupCounts[SubscriberEntity::STATUS_UNCONFIRMED], ], [ 'name' => SubscriberEntity::STATUS_UNSUBSCRIBED, - 'label' => WPFunctions::get()->__('Unsubscribed', 'mailpoet'), + 'label' => __('Unsubscribed', 'mailpoet'), 'count' => $groupCounts[SubscriberEntity::STATUS_UNSUBSCRIBED], ], [ 'name' => SubscriberEntity::STATUS_INACTIVE, - 'label' => WPFunctions::get()->__('Inactive', 'mailpoet'), + 'label' => __('Inactive', 'mailpoet'), 'count' => $groupCounts[SubscriberEntity::STATUS_INACTIVE], ], [ 'name' => SubscriberEntity::STATUS_BOUNCED, - 'label' => WPFunctions::get()->__('Bounced', 'mailpoet'), + 'label' => __('Bounced', 'mailpoet'), 'count' => $groupCounts[SubscriberEntity::STATUS_BOUNCED], ], [ 'name' => 'trash', - 'label' => WPFunctions::get()->__('Trash', 'mailpoet'), + 'label' => __('Trash', 'mailpoet'), 'count' => $trashedCount, ], ]; @@ -268,7 +267,7 @@ class SubscriberListingRepository extends ListingRepository { // format segment list $allSubscribersList = [ - 'label' => WPFunctions::get()->__('All Lists', 'mailpoet'), + 'label' => __('All Lists', 'mailpoet'), 'value' => '', ]; diff --git a/mailpoet/lib/Subscription/CaptchaRenderer.php b/mailpoet/lib/Subscription/CaptchaRenderer.php index b848a11ac4..870bfd42b3 100644 --- a/mailpoet/lib/Subscription/CaptchaRenderer.php +++ b/mailpoet/lib/Subscription/CaptchaRenderer.php @@ -7,15 +7,11 @@ use MailPoet\Form\FormsRepository; use MailPoet\Form\Renderer as FormRenderer; use MailPoet\Form\Util\Styles; use MailPoet\Util\Url as UrlHelper; -use MailPoet\WP\Functions as WPFunctions; class CaptchaRenderer { /** @var UrlHelper */ private $urlHelper; - /** @var WPFunctions */ - private $wp; - /** @var CaptchaSession */ private $captchaSession; @@ -33,7 +29,6 @@ class CaptchaRenderer { public function __construct( UrlHelper $urlHelper, - WPFunctions $wp, CaptchaSession $captchaSession, SubscriptionUrlFactory $subscriptionUrlFactory, FormsRepository $formsRepository, @@ -41,7 +36,6 @@ class CaptchaRenderer { Styles $styles ) { $this->urlHelper = $urlHelper; - $this->wp = $wp; $this->captchaSession = $captchaSession; $this->subscriptionUrlFactory = $subscriptionUrlFactory; $this->formRenderer = $formRenderer; @@ -50,7 +44,7 @@ class CaptchaRenderer { } public function getCaptchaPageTitle() { - return $this->wp->__("Confirm you’re not a robot", 'mailpoet'); + return __("Confirm you’re not a robot", 'mailpoet'); } public function getCaptchaPageContent($sessionId) { @@ -60,7 +54,7 @@ class CaptchaRenderer { 'id' => 'captcha', 'type' => 'text', 'params' => [ - 'label' => $this->wp->__('Type in the characters you see in the picture above:', 'mailpoet'), + 'label' => __('Type in the characters you see in the picture above:', 'mailpoet'), 'value' => '', 'obfuscate' => false, ], @@ -74,7 +68,7 @@ class CaptchaRenderer { 'id' => 'submit', 'type' => 'submit', 'params' => [ - 'label' => $this->wp->__('Subscribe', 'mailpoet'), + 'label' => __('Subscribe', 'mailpoet'), ], ], ] @@ -123,7 +117,7 @@ class CaptchaRenderer { $formHtml .= '
'; $formHtml .= '

'; - $formHtml .= ''; + $formHtml .= ''; $formHtml .= '

'; // subscription form @@ -146,7 +140,7 @@ class CaptchaRenderer { $settings = $formModel->getSettings() ?? []; $formHtml = '
'; $formHtml .= ''; - $formHtml .= ''; + $formHtml .= ''; $formHtml .= '
'; return $formHtml; } diff --git a/mailpoet/lib/Subscription/Comment.php b/mailpoet/lib/Subscription/Comment.php index e80c644304..d4fce418e1 100644 --- a/mailpoet/lib/Subscription/Comment.php +++ b/mailpoet/lib/Subscription/Comment.php @@ -44,7 +44,7 @@ class Comment { private function getSubscriptionField(): string { $label = $this->settings->get( 'subscribe.on_comment.label', - WPFunctions::get()->__('Yes, please add me to your mailing list.', 'mailpoet') + __('Yes, please add me to your mailing list.', 'mailpoet') ); return '

diff --git a/mailpoet/lib/Subscription/Pages.php b/mailpoet/lib/Subscription/Pages.php index d8bbd3850b..7c68b299a5 100644 --- a/mailpoet/lib/Subscription/Pages.php +++ b/mailpoet/lib/Subscription/Pages.php @@ -262,14 +262,14 @@ class Pages { global $post; if ( - ($post->post_title !== $this->wp->__('MailPoet Page', 'mailpoet')) // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps + ($post->post_title !== __('MailPoet Page', 'mailpoet')) // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps || ($pageTitle !== $this->wp->singlePostTitle('', false)) ) { // when it's a custom page, just return the original page title return $pageTitle; } elseif ($this->action !== self::ACTION_CAPTCHA && $this->isPreview() === false && $this->subscriber === null) { - return $this->wp->__("Hmmm... we don't have a record of you.", 'mailpoet'); + return __("Hmmm... we don't have a record of you.", 'mailpoet'); } else { // when it's our own page, generate page title based on requested action switch ($this->action) { @@ -297,7 +297,7 @@ class Pages { public function setPageContent($pageContent = '[mailpoet_page]') { // if we're not in preview mode or captcha page and the subscriber does not exist if ($this->action !== self::ACTION_CAPTCHA && $this->isPreview() === false && $this->subscriber === null) { - return $this->wp->__("Your email address doesn't appear in our lists anymore. Sign up again or contact us if this appears to be a mistake.", 'mailpoet'); + return __("Your email address doesn't appear in our lists anymore. Sign up again or contact us if this appears to be a mistake.", 'mailpoet'); } $this->assetsController->setupFrontEndDependencies(); @@ -357,7 +357,7 @@ class Pages { private function getConfirmTitle() { if ($this->isPreview()) { $title = sprintf( - $this->wp->__("You have subscribed to: %s", 'mailpoet'), + __("You have subscribed to: %s", 'mailpoet'), 'demo 1, demo 2' ); } else { @@ -366,10 +366,10 @@ class Pages { }, $this->subscriber->getSegments()->toArray()); if (empty($segmentNames)) { - $title = $this->wp->__("You are now subscribed!", 'mailpoet'); + $title = __("You are now subscribed!", 'mailpoet'); } else { $title = sprintf( - $this->wp->__("You have subscribed to: %s", 'mailpoet'), + __("You have subscribed to: %s", 'mailpoet'), join(', ', $segmentNames) ); } @@ -379,13 +379,13 @@ class Pages { private function getManageTitle() { if ($this->isPreview() || $this->subscriber !== null) { - return $this->wp->__("Manage your subscription", 'mailpoet'); + return __("Manage your subscription", 'mailpoet'); } } private function getUnsubscribeTitle() { if ($this->isPreview() || $this->subscriber !== null) { - return $this->wp->__("You are now unsubscribed.", 'mailpoet'); + return __("You are now unsubscribed.", 'mailpoet'); } } @@ -397,13 +397,13 @@ class Pages { private function getConfirmUnsubscribeTitle() { if ($this->isPreview() || $this->subscriber !== null) { - return $this->wp->__('Confirm you want to unsubscribe', 'mailpoet'); + return __('Confirm you want to unsubscribe', 'mailpoet'); } } private function getConfirmContent() { if ($this->isPreview() || $this->subscriber !== null) { - return $this->wp->__("Yup, we've added you to our email list. You'll hear from us shortly.", 'mailpoet'); + return __("Yup, we've added you to our email list. You'll hear from us shortly.", 'mailpoet'); } } @@ -417,7 +417,7 @@ class Pages { } else if ($this->subscriber !== null) { $subscriber = $this->subscriber; } else { - return $this->wp->__('Subscription management form is only available to mailing lists subscribers.', 'mailpoet'); + return __('Subscription management form is only available to mailing lists subscribers.', 'mailpoet'); } $formStatus = isset($_GET['success']) && absint(wp_unslash($_GET['success'])) @@ -471,7 +471,7 @@ class Pages { $text = ( isset($params['text']) ? htmlspecialchars($params['text']) - : $this->wp->__('Manage your subscription', 'mailpoet') + : __('Manage your subscription', 'mailpoet') ); return '' . $text . ''; diff --git a/mailpoet/lib/Subscription/Registration.php b/mailpoet/lib/Subscription/Registration.php index 979f517647..cacff1fc6e 100644 --- a/mailpoet/lib/Subscription/Registration.php +++ b/mailpoet/lib/Subscription/Registration.php @@ -36,7 +36,7 @@ class Registration { public function extendForm() { $label = $this->settings->get( 'subscribe.on_register.label', - WPFunctions::get()->__('Yes, please add me to your mailing list.', 'mailpoet') + __('Yes, please add me to your mailing list.', 'mailpoet') ); $form = '

diff --git a/mailpoet/lib/Twig/Functions.php b/mailpoet/lib/Twig/Functions.php index 3b8f1124fb..49455c8f0d 100644 --- a/mailpoet/lib/Twig/Functions.php +++ b/mailpoet/lib/Twig/Functions.php @@ -189,10 +189,10 @@ class Functions extends AbstractExtension { $label = null; $labels = [ - 'minute' => $this->getWp()->__('every minute', 'mailpoet'), - 'minutes' => $this->getWp()->__('every %1$d minutes', 'mailpoet'), - 'hour' => $this->getWp()->__('every hour', 'mailpoet'), - 'hours' => $this->getWp()->__('every %1$d hours', 'mailpoet'), + 'minute' => __('every minute', 'mailpoet'), + 'minutes' => __('every %1$d minutes', 'mailpoet'), + 'hour' => __('every hour', 'mailpoet'), + 'hours' => __('every %1$d hours', 'mailpoet'), ]; if ($value >= 60) { @@ -212,11 +212,7 @@ class Functions extends AbstractExtension { } } - if ($label !== null) { - return sprintf($label, $value); - } else { - return $value; - } + return sprintf($label, $value); } public function getWPDateFormat() { diff --git a/mailpoet/lib/Util/Notices/AfterMigrationNotice.php b/mailpoet/lib/Util/Notices/AfterMigrationNotice.php index ba61285654..1500759d0c 100644 --- a/mailpoet/lib/Util/Notices/AfterMigrationNotice.php +++ b/mailpoet/lib/Util/Notices/AfterMigrationNotice.php @@ -4,7 +4,6 @@ namespace MailPoet\Util\Notices; use MailPoet\Settings\SettingsController; use MailPoet\Util\Helpers; -use MailPoet\WP\Functions as WPFunctions; class AfterMigrationNotice { @@ -33,7 +32,7 @@ class AfterMigrationNotice { private function display() { $message = Helpers::replaceLinkTags( - WPFunctions::get()->__('Congrats! You’re progressing well so far. Complete your upgrade thanks to this [link]checklist[/link].', 'mailpoet'), + __('Congrats! You’re progressing well so far. Complete your upgrade thanks to this [link]checklist[/link].', 'mailpoet'), 'https://kb.mailpoet.com/article/199-checklist-after-migrating-to-mailpoet3', [ 'target' => '_blank', diff --git a/mailpoet/lib/Util/Notices/UnauthorizedEmailInNewslettersNotice.php b/mailpoet/lib/Util/Notices/UnauthorizedEmailInNewslettersNotice.php index e957a91bf3..1d6d9fdf03 100644 --- a/mailpoet/lib/Util/Notices/UnauthorizedEmailInNewslettersNotice.php +++ b/mailpoet/lib/Util/Notices/UnauthorizedEmailInNewslettersNotice.php @@ -46,14 +46,14 @@ class UnauthorizedEmailInNewslettersNotice { } private function getMessageText() { - $message = $this->wp->__('Your automatic emails have been paused because some email addresses haven’t been authorized yet.', 'mailpoet'); + $message = __('Your automatic emails have been paused because some email addresses haven’t been authorized yet.', 'mailpoet'); return "

$message

"; } private function getNewslettersLinks($validationError) { $links = ''; foreach ($validationError['invalid_senders_in_newsletters'] as $error) { - $linkText = $this->wp->_x('Update the from address of %s', '%s will be replaced by a newsletter subject', 'mailpoet'); + $linkText = _x('Update the from address of %s', '%s will be replaced by a newsletter subject', 'mailpoet'); $linkText = str_replace('%s', EscapeHelper::escapeHtmlText($error['subject']), $linkText); $linkUrl = $this->wp->adminUrl('admin.php?page=' . Menu::MAIN_PAGE_SLUG . '#/send/' . $error['newsletter_id']); $link = Helpers::replaceLinkTags("[link]{$linkText}[/link]", $linkUrl, ['target' => '_blank']); @@ -63,7 +63,7 @@ class UnauthorizedEmailInNewslettersNotice { } private function getFixThisButton() { - $button = ''; + $button = ''; return "

$button

"; } } diff --git a/mailpoet/lib/Util/Notices/UnauthorizedEmailNotice.php b/mailpoet/lib/Util/Notices/UnauthorizedEmailNotice.php index f5edb902f7..a8376aab5c 100644 --- a/mailpoet/lib/Util/Notices/UnauthorizedEmailNotice.php +++ b/mailpoet/lib/Util/Notices/UnauthorizedEmailNotice.php @@ -54,7 +54,7 @@ class UnauthorizedEmailNotice { } private function getMessageText($validationError) { - $text = $this->wp->_x('Sending all of your emails has been paused because your email address %s hasn’t been authorized yet.', + $text = _x('Sending all of your emails has been paused because your email address %s hasn’t been authorized yet.', 'Email addresses have to be authorized to be used to send emails. %s will be replaced by an email address.', 'mailpoet'); $message = str_replace('%s', EscapeHelper::escapeHtmlText($validationError['invalid_sender_address']), $text); @@ -63,18 +63,18 @@ class UnauthorizedEmailNotice { private function getAuthorizeEmailButton($validationError) { $email = $this->wp->escAttr($validationError['invalid_sender_address']); - $button = '' . $this->wp->__('Authorize this email address', 'mailpoet') . ''; + $button = '' . __('Authorize this email address', 'mailpoet') . ''; return $button; } private function getDifferentEmailButton() { - $button = ''; + $button = ''; return $button; } private function getResumeSendingButton($validationError) { $email = $this->wp->escAttr($validationError['invalid_sender_address']); - $button = ''; + $button = ''; return $button; } } diff --git a/mailpoet/lib/WP/Functions.php b/mailpoet/lib/WP/Functions.php index f723b33db3..090ecb0afd 100644 --- a/mailpoet/lib/WP/Functions.php +++ b/mailpoet/lib/WP/Functions.php @@ -57,26 +57,6 @@ class Functions { return call_user_func_array('add_action', func_get_args()); } - public function __($text, $domain = 'default') { - return __($text, $domain); - } - - // phpcs:disable WordPress.Security.EscapeOutput.UnsafePrintingFunction, WordPress.Security.EscapeOutput.OutputNotEscaped - public function _e($text, $domain = 'default') { - return _e($text, $domain); - } - - // phpcs:enable WordPress.Security.EscapeOutput.UnsafePrintingFunction, WordPress.Security.EscapeOutput.OutputNotEscaped - - - public function _n($single, $plural, $number, $domain = 'default') { - return _n($single, $plural, $number, $domain); - } - - public function _x($text, $context, $domain = 'default') { - return _x($text, $context, $domain); - } - public function addCommentMeta($commentId, $metaKey, $metaValue, $unique = false) { return add_comment_meta($commentId, $metaKey, $metaValue, $unique); } @@ -478,10 +458,6 @@ class Functions { return stripslashes_deep($value); } - public function translate($text, $domain = 'default') { - return translate($text, $domain); - } - public function unloadTextdomain($domain) { return unload_textdomain($domain); } diff --git a/mailpoet/lib/WP/Notice.php b/mailpoet/lib/WP/Notice.php index 19f3458bda..311ef369e6 100644 --- a/mailpoet/lib/WP/Notice.php +++ b/mailpoet/lib/WP/Notice.php @@ -39,7 +39,7 @@ class Notice { if ($showErrorTitle) { $message = sprintf( "%s %s", - WPFunctions::get()->__('MailPoet Error:', 'mailpoet'), + __('MailPoet Error:', 'mailpoet'), $message ); } diff --git a/mailpoet/lib/WooCommerce/TransactionalEmails.php b/mailpoet/lib/WooCommerce/TransactionalEmails.php index 08bfe3098a..19274be7ca 100644 --- a/mailpoet/lib/WooCommerce/TransactionalEmails.php +++ b/mailpoet/lib/WooCommerce/TransactionalEmails.php @@ -111,7 +111,7 @@ class TransactionalEmails { 'woocommerce_email_background_color' => '#f7f7f7', 'woocommerce_email_base_color' => '#333333', 'woocommerce_email_body_background_color' => '#ffffff', - 'woocommerce_email_footer_text' => $this->wp->_x('Footer text', 'Default footer text for a WooCommerce transactional email', 'mailpoet'), + 'woocommerce_email_footer_text' => _x('Footer text', 'Default footer text for a WooCommerce transactional email', 'mailpoet'), 'woocommerce_email_header_image' => Env::$assetsUrl . '/img/newsletter_editor/wc-default-logo.png', 'woocommerce_email_text_color' => '#111111', ]; diff --git a/mailpoet/tests/unit/API/JSON/ErrorHandlerTest.php b/mailpoet/tests/unit/API/JSON/ErrorHandlerTest.php index a581d2c3e0..a193197aca 100644 --- a/mailpoet/tests/unit/API/JSON/ErrorHandlerTest.php +++ b/mailpoet/tests/unit/API/JSON/ErrorHandlerTest.php @@ -34,7 +34,7 @@ class ErrorHandlerTest extends \MailPoetUnitTest { } private function runErrorHandlerTest(Exception $exception, int $expectedCode) { - $errorHandler = new ErrorHandler(new WPFunctions()); + $errorHandler = new ErrorHandler(); $response = $errorHandler->convertToResponse($exception->withErrors([ 'key' => 'value', ]));