PHP 8.2.31
Preview: ConfirmInterestOrUnsubscribe.php Size: 8.14 KB
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/Config/PopulatorData/Templates/ConfirmInterestOrUnsubscribe.php

<?php declare(strict_types = 1);

namespace MailPoet\Config\PopulatorData\Templates;

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


use MailPoet\WP\Functions as WPFunctions;

class ConfirmInterestOrUnsubscribe {
  private $assets_url;
  private $external_template_image_url;
  private $template_image_url;

  public function __construct($assets_url) {
    $this->assets_url = $assets_url;
    $this->external_template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/confirm-interest-or-unsubscribe';
    $this->template_image_url = $this->assets_url . '/img/blank_templates';
  }

  public function get(): array {
    return [
      'name' => __('Confirm your interest or unsubscribe', 'mailpoet'),
      'categories' => json_encode(['re_engagement', 'all']),
      'readonly' => 1,
      'thumbnail' => $this->getThumbnail(),
      'body' => json_encode($this->getBody()),
    ];
  }

  private function getBody(): array {
    return [
      'content' => [
        'type' => 'container',
        'columnLayout' => false,
        'orientation' => 'vertical',
        'image' => [
          'src' => null,
          'display' => 'scale',
        ],
        'styles' => [
          'block' => [
            'backgroundColor' => 'transparent',
          ],
        ],
        'blocks' => [
          [
            'type' => 'container',
            'columnLayout' => false,
            'orientation' => 'horizontal',
            'image' => [
              'src' => null,
              'display' => 'scale',
            ],
            'styles' => [
              'block' => [
                'backgroundColor' => '#ffffff',
              ],
            ],
            'blocks' => [
              [
                'type' => 'container',
                'columnLayout' => false,
                'orientation' => 'vertical',
                'image' => [
                  'src' => null,
                  'display' => 'scale',
                ],
                'styles' => [
                  'block' => [
                    'backgroundColor' => 'transparent',
                  ],
                ],
                'blocks' => [
                  [
                    'type' => 'spacer',
                    'styles' => [
                      'block' => [
                        'backgroundColor' => 'transparent',
                        'height' => '30px',
                      ],
                    ],
                  ],
                  [
                    'type' => 'image',
                    'link' => '',
                    'src' => $this->template_image_url . '/fake-logo.png',
                    'alt' => __('Fake logo', 'mailpoet'),
                    'fullWidth' => false,
                    'width' => '598px',
                    'height' => '71px',
                    'styles' => [
                      'block' => [
                        'textAlign' => 'center',
                      ],
                    ],
                  ],
                  [
                    'type' => 'text',
                    'text' => __('<p style="text-align: left;">Hi [subscriber:firstname | default:there],</p><p style="text-align: left;"></p>
                                  <p style="text-align: left;"><span>It\'s been a while since you opened our emails. If you have changed your mind since you subscribed and are no longer interested, we get it! We won\'t make it hard for you, so feel free to unsubscribe right away.&nbsp;</span></p><p style="text-align: left;"></p>
                                  <p style="text-align: left;"><a href="[link:subscription_unsubscribe_url]">Unsubscribe me!</a></p><p style="text-align: left;"></p>
                                  <p style="text-align: left;">(When you unsubscribe, you\'ll stop receiving all future emails from us.)</p><p style="text-align: left;"></p>
                                  <p style="text-align: left;"><span>On the other hand, if you like our emails and want to keep receiving them, please <strong>reconfirm your subscription by clicking the big button below</strong>.</span></p>', 'mailpoet'),
                  ],
                  [
                    'type' => 'button',
                    'text' => __('Yes, keep me subscribed!', 'mailpoet'),
                    'url' => '[link:subscription_re_engage_url]',
                    'styles' => [
                      'block' => [
                        'backgroundColor' => '#2ea1cd',
                        'borderColor' => '#0074a2',
                        'borderWidth' => '1px',
                        'borderRadius' => '5px',
                        'borderStyle' => 'solid',
                        'width' => '288px',
                        'lineHeight' => '40px',
                        'fontColor' => '#ffffff',
                        'fontFamily' => 'Verdana',
                        'fontSize' => '16px',
                        'fontWeight' => 'normal',
                        'textAlign' => 'center',
                      ],
                    ],
                  ],
                ],
              ],
            ],
          ],
          [
            'type' => 'container',
            'columnLayout' => false,
            'orientation' => 'horizontal',
            'image' => [
              'src' => null,
              'display' => 'scale',
            ],
            'styles' => [
              'block' => [
                'backgroundColor' => '#ffffff',
              ],
            ],
            'blocks' => [
              [
                'type' => 'container',
                'columnLayout' => false,
                'orientation' => 'vertical',
                'image' => [
                  'src' => null,
                  'display' => 'scale',
                ],
                'styles' => [
                  'block' => [
                    'backgroundColor' => 'transparent',
                  ],
                ],
                'blocks' => [
                  [
                    'type' => 'text',
                    'text' => '<p><strong><em></em></strong></p><p><strong><em>' . __('The MailPoet Team', 'mailpoet') . '</em></strong></p>',
                  ],
                  [
                    'type' => 'footer',
                    'text' => '<p><a href="[link:subscription_unsubscribe_url]">' . __('Unsubscribe', 'mailpoet') . '</a> | <a href="[link:subscription_manage_url]">' . __('Manage your subscription', 'mailpoet') . '</a><br />' . __('Add your postal address here!', 'mailpoet') . '</p>',
                    'styles' => [
                      'block' => [
                        'backgroundColor' => 'transparent',
                      ],
                      'text' => [
                        'fontColor' => '#222222',
                        'fontFamily' => 'Arial',
                        'fontSize' => '12px',
                        'textAlign' => 'left',
                      ],
                      'link' => [
                        'fontColor' => '#6cb7d4',
                        'textDecoration' => 'none',
                      ],
                    ],
                  ],
                ],
              ],
            ],
          ],
        ],
      ],
      'globalStyles' => [
        'text' => [
          'fontColor' => '#000000',
          'fontFamily' => 'Arial',
          'fontSize' => '15px',
          'lineHeight' => '1.6',
        ],
        'h1' => [
          'fontColor' => '#111111',
          'fontFamily' => 'Trebuchet MS',
          'fontSize' => '30px',
          'lineHeight' => '1.6',
        ],
        'h2' => [
          'fontColor' => '#222222',
          'fontFamily' => 'Trebuchet MS',
          'fontSize' => '24px',
          'lineHeight' => '1.6',
        ],
        'h3' => [
          'fontColor' => '#333333',
          'fontFamily' => 'Trebuchet MS',
          'fontSize' => '22px',
          'lineHeight' => '1.6',
        ],
        'link' => [
          'fontColor' => '#21759B',
          'textDecoration' => 'underline',
        ],
        'wrapper' => [
          'backgroundColor' => '#ffffff',
        ],
        'body' => [
          'backgroundColor' => '#ffffff',
        ],
      ],
    ];
  }

  private function getThumbnail(): string {
    return $this->external_template_image_url . '/thumbnail.20211026.jpg';
  }
}

Directory Contents

Dirs: 0 × Files: 77

Name Size Perms Modified Actions
14.43 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
41.20 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
51.96 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
35.90 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
62.50 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
40.89 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
44.93 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
47.27 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
57.22 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
44.51 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
36.75 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
34.79 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
7.98 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
8.14 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
46.75 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
47.68 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
38.57 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
17.39 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
47.25 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
33.66 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
44.36 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
31.66 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
59.13 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
18.43 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
47.91 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
46.54 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
25.28 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
14.93 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
54.00 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
76.18 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
56.96 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
44.94 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
39.53 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
67.17 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
39.78 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
45.84 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
48.18 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
61.03 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
54.85 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
37.81 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
60.64 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
46.54 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
8.88 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
11.17 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
11.75 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
13.23 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
38.47 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
40.42 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
42.83 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
31.36 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
62.25 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
15.04 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
39.32 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
12.60 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
43.32 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
44.92 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
42.58 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
53.05 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
28.63 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
38.20 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
31.93 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
46.91 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
20.55 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
7.31 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
39.87 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
31.60 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
56.64 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
25.88 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
43.87 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
9.32 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
12.41 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
30.25 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
37.79 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
43.61 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
28.17 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
28.52 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).