_translations = $translations; } public function __construct( Ai1ec_Registry_Object $registry, $message, array $recipients, $subject ) { parent::__construct( $registry ); $this->_message = $message; $this->_recipients = $recipients; $this->_subject = $subject; } public function send( $headers = null ) { $this->_parse_text(); return wp_mail( $this->_recipients, $this->_subject, $this->_message, $headers ); } private function _parse_text() { if ( null !== $this->_translations ) { $this->_message = strtr( $this->_message, $this->_translations ); $this->_subject = strtr( $this->_subject, $this->_translations ); } } }