[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.147.83.92: ~ $
<?php

namespace MailPoet\Mailer;

if (!defined('ABSPATH')) exit;


use MailPoet\Entities\SubscriberEntity;
use MailPoet\Models\Newsletter;
use MailPoet\Models\Subscriber;

class MetaInfo {
  public function getSendingTestMetaInfo() {
    return $this->makeMetaInfo('sending_test', 'unknown', 'administrator');
  }

  public function getPreviewMetaInfo() {
    return $this->makeMetaInfo('preview', 'unknown', 'administrator');
  }

  public function getStatsNotificationMetaInfo() {
    return $this->makeMetaInfo('email_stats_notification', 'unknown', 'administrator');
  }

  public function getWordPressTransactionalMetaInfo(SubscriberEntity $subscriber = null) {
    return $this->makeMetaInfo(
      'transactional',
      $subscriber ? $subscriber->getStatus() : 'unknown',
      $subscriber ? $subscriber->getSource() : 'unknown'
    );
  }

  public function getConfirmationMetaInfo(Subscriber $subscriber) {
    return $this->makeMetaInfo('confirmation', $subscriber->status, $subscriber->source);
  }

  public function getNewSubscriberNotificationMetaInfo() {
    return $this->makeMetaInfo('new_subscriber_notification', 'unknown', 'administrator');
  }

  public function getNewsletterMetaInfo($newsletter, Subscriber $subscriber) {
    $type = 'unknown';
    switch ($newsletter->type) {
      case Newsletter::TYPE_AUTOMATIC:
        $group = isset($newsletter->options['group']) ? $newsletter->options['group'] : 'unknown';
        $event = isset($newsletter->options['event']) ? $newsletter->options['event'] : 'unknown';
        $type = sprintf('automatic_%s_%s', $group, $event);
        break;
      case Newsletter::TYPE_STANDARD:
        $type = 'newsletter';
        break;
      case Newsletter::TYPE_WELCOME:
        $type = 'welcome';
        break;
      case Newsletter::TYPE_NOTIFICATION:
      case Newsletter::TYPE_NOTIFICATION_HISTORY:
        $type = 'post_notification';
        break;
    }
    return $this->makeMetaInfo($type, $subscriber->status, $subscriber->source);
  }

  private function makeMetaInfo($emailType,  $subscriberStatus, $subscriberSource) {
    return [
      'email_type' => $emailType,
      'subscriber_status' => $subscriberStatus,
      'subscriber_source' => $subscriberSource ?: 'unknown',
    ];
  }
}

Filemanager

Name Type Size Permission Actions
Methods Folder 0700
WordPress Folder 0700
Mailer.php File 7.13 KB 0644
MailerError.php File 2.5 KB 0644
MailerLog.php File 6.02 KB 0644
MetaInfo.php File 2.21 KB 0644
SubscriberError.php File 698 B 0644
index.php File 0 B 0644