Replace all WP function calls
This commit is contained in:
committed by
M. Shull
parent
986482e34b
commit
0a436087e1
@ -9,6 +9,8 @@ if (!defined('ABSPATH')) exit;
|
||||
* @property string $type
|
||||
* @property string|array $params
|
||||
*/
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
class CustomField extends Model {
|
||||
public static $_table = MP_CUSTOM_FIELDS_TABLE;
|
||||
const TYPE_DATE = 'date';
|
||||
@ -21,10 +23,10 @@ class CustomField extends Model {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->addValidations('name', array(
|
||||
'required' => __('Please specify a name.', 'mailpoet')
|
||||
'required' => WPFunctions::get()->__('Please specify a name.', 'mailpoet')
|
||||
));
|
||||
$this->addValidations('type', array(
|
||||
'required' => __('Please specify a type.', 'mailpoet')
|
||||
'required' => WPFunctions::get()->__('Please specify a type.', 'mailpoet')
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user