Replace all WP function calls

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

View File

@@ -1,8 +1,8 @@
<?php
namespace MailPoet\Subscribers;
use MailPoet\Models\CustomField;
use MailPoet\WP\Functions as WPFunctions;
class RequiredCustomFieldValidator {
@@ -16,7 +16,7 @@ class RequiredCustomFieldValidator {
foreach ($all_custom_fields as $custom_field_id => $custom_field_name) {
if ($this->isCustomFieldMissing($custom_field_id, $data)) {
throw new \Exception(
__(sprintf('Missing value for custom field "%s"', $custom_field_name), 'mailpoet')
WPFunctions::get()->__(sprintf('Missing value for custom field "%s"', $custom_field_name), 'mailpoet')
);
}
}