template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/charity';
$this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons';
}
public function get() {
return [
'name' => __("Charity", 'mailpoet'),
'categories' => json_encode(['standard', 'all']),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
];
}
private function getThumbnail() {
return $this->template_image_url . '/thumbnail.20190411-1500.jpg';
}
private function getBody() {
return [
'content' =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#7bc9ee',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
],
],
],
],
1 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => $this->template_image_url . '/header-bg.jpg',
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/charity-logo.png',
'alt' => 'charity-logo',
'fullWidth' => false,
'width' => '240px',
'height' => '103px',
'styles' =>
[
'block' =>
[
'textAlign' => 'left',
],
],
],
],
],
1 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '43px',
],
],
],
1 =>
[
'type' => 'text',
'text' => '
Charity Number: 09238923
',
],
],
],
],
],
2 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => $this->template_image_url . '/charity-header.jpg',
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '45px',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'We need your help
',
],
2 =>
[
'type' => 'text',
'text' => 'For just $5 a month, you can help people around the world that are in desperate need of fresh, clean water.
',
],
3 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '80px',
],
],
],
],
],
1 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
[
"type" => "spacer",
"styles" => [
"block" => [
"backgroundColor" => "transparent",
"height" => "20px",
],
],
],
],
],
],
],
3 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '35px',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'It only takes 5 minutes to help someone in need
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis pharetra diam semper, vulputate eros quis, sagittis ipsum. Vivamus ullamcorper sapien at sapien maximus, nec venenatis sapien tincidunt. Duis viverra imperdiet magna, a facilisis diam scelerisque at. Nunc at quam ligula. Nullam ut magna velit.
',
],
2 =>
[
'type' => 'button',
'text' => 'Start Helping Now',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#05a0e8',
'borderColor' => '#05a0e8',
'borderWidth' => '1px',
'borderRadius' => '3px',
'borderStyle' => 'solid',
'width' => '241px',
'lineHeight' => '50px',
'fontColor' => '#ffffff',
'fontFamily' => 'Arial',
'fontSize' => '20px',
'fontWeight' => 'bold',
'textAlign' => 'center',
],
],
],
3 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '25px',
],
],
],
],
],
],
],
4 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#7bc9ee',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '30px',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'Noah\'s Story
',
],
],
],
],
],
5 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#7bc9ee',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Charity-Child.png',
'alt' => 'Charity-Child',
'fullWidth' => false,
'width' => '200px',
'height' => '200px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
1 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'text',
'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis pharetra diam semper, vulputate eros quis, sagittis ipsum. Vivamus ullamcorper sapien at sapien maximus, nec venenatis sapien tincidunt.
Duis viverra imperdiet magna, a facilisis diam scelerisque at. Nunc at quam ligula. Nullam ut magna velit.
',
],
],
],
],
],
6 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#7bc9ee',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Charity-Video.jpg',
'alt' => 'Charity-Video',
'fullWidth' => false,
'width' => '1280px',
'height' => '760px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
],
],
7 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#ffffff',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Charity-Logo-Small.png',
'alt' => 'Charity-Logo-Small',
'fullWidth' => false,
'width' => '407px',
'height' => '82px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
1 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'social',
'iconSet' => 'full-symbol-black',
'icons' =>
[
0 =>
[
'type' => 'socialIcon',
'iconType' => 'facebook',
'link' => 'http://www.facebook.com',
'image' => $this->social_icon_url . '/07-full-symbol-black/Facebook.png',
'height' => '32px',
'width' => '32px',
'text' => 'Facebook',
],
1 =>
[
'type' => 'socialIcon',
'iconType' => 'twitter',
'link' => 'http://www.twitter.com',
'image' => $this->social_icon_url . '/07-full-symbol-black/Twitter.png',
'height' => '32px',
'width' => '32px',
'text' => 'Twitter',
],
2 =>
[
'type' => 'socialIcon',
'iconType' => 'instagram',
'link' => 'http://instagram.com',
'image' => $this->social_icon_url . '/07-full-symbol-black/Instagram.png',
'height' => '32px',
'width' => '32px',
'text' => 'Instagram',
],
],
],
],
],
2 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'text',
'text' => '' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '
',
],
],
],
],
],
],
],
'globalStyles' =>
[
'text' =>
[
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '14px',
],
'h1' =>
[
'fontColor' => '#111111',
'fontFamily' => 'Arial',
'fontSize' => '30px',
],
'h2' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '24px',
],
'h3' =>
[
'fontColor' => '#333333',
'fontFamily' => 'Verdana',
'fontSize' => '18px',
],
'link' =>
[
'fontColor' => '#05a0e8',
'textDecoration' => 'underline',
],
'wrapper' =>
[
'backgroundColor' => '#ffffff',
],
'body' =>
[
'backgroundColor' => '#7bc9ee',
],
],
'blockDefaults' =>
[
'automatedLatestContent' =>
[
'amount' => '5',
'withLayout' => false,
'contentType' => 'post',
'inclusionType' => 'include',
'displayType' => 'excerpt',
'titleFormat' => 'h1',
'titleAlignment' => 'left',
'titleIsLink' => false,
'imageFullWidth' => false,
'featuredImagePosition' => 'belowTitle',
'showAuthor' => 'no',
'authorPrecededBy' => 'Author:',
'showCategories' => 'no',
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
'readMoreButton' =>
[
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
'borderWidth' => '1px',
'borderRadius' => '5px',
'borderStyle' => 'solid',
'width' => '180px',
'lineHeight' => '40px',
'fontColor' => '#ffffff',
'fontFamily' => 'Verdana',
'fontSize' => '18px',
'fontWeight' => 'normal',
'textAlign' => 'center',
],
],
],
'sortBy' => 'newest',
'showDivider' => true,
'divider' =>
[
'context' => 'automatedLatestContent.divider',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
],
],
],
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
],
'automatedLatestContentLayout' =>
[
'amount' => '5',
'withLayout' => true,
'contentType' => 'post',
'inclusionType' => 'include',
'displayType' => 'excerpt',
'titleFormat' => 'h1',
'titleAlignment' => 'left',
'titleIsLink' => false,
'imageFullWidth' => false,
'featuredImagePosition' => 'alternate',
'showAuthor' => 'no',
'authorPrecededBy' => 'Author:',
'showCategories' => 'no',
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'button',
'readMoreText' => 'Read more',
'readMoreButton' =>
[
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
'borderWidth' => '1px',
'borderRadius' => '5px',
'borderStyle' => 'solid',
'width' => '180px',
'lineHeight' => '40px',
'fontColor' => '#ffffff',
'fontFamily' => 'Verdana',
'fontSize' => '18px',
'fontWeight' => 'normal',
'textAlign' => 'center',
],
],
],
'sortBy' => 'newest',
'showDivider' => true,
'divider' =>
[
'context' => 'automatedLatestContentLayout.divider',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
],
],
],
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
],
'button' =>
[
'text' => 'Button',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
'borderWidth' => '1px',
'borderRadius' => '5px',
'borderStyle' => 'solid',
'width' => '180px',
'lineHeight' => '40px',
'fontColor' => '#ffffff',
'fontFamily' => 'Verdana',
'fontSize' => '18px',
'fontWeight' => 'normal',
'textAlign' => 'center',
],
],
],
'divider' =>
[
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
],
],
],
'footer' =>
[
'text' => '' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '
',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
'text' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
],
'link' =>
[
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
],
],
],
'posts' =>
[
'amount' => '10',
'withLayout' => true,
'contentType' => 'post',
'postStatus' => 'publish',
'inclusionType' => 'include',
'displayType' => 'excerpt',
'titleFormat' => 'h1',
'titleAlignment' => 'left',
'titleIsLink' => false,
'imageFullWidth' => false,
'featuredImagePosition' => 'alternate',
'showAuthor' => 'no',
'authorPrecededBy' => 'Author:',
'showCategories' => 'no',
'categoriesPrecededBy' => 'Categories:',
'readMoreType' => 'link',
'readMoreText' => 'Read more',
'readMoreButton' =>
[
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#2ea1cd',
'borderColor' => '#0074a2',
'borderWidth' => '1px',
'borderRadius' => '5px',
'borderStyle' => 'solid',
'width' => '180px',
'lineHeight' => '40px',
'fontColor' => '#ffffff',
'fontFamily' => 'Verdana',
'fontSize' => '18px',
'fontWeight' => 'normal',
'textAlign' => 'center',
],
],
],
'sortBy' => 'newest',
'showDivider' => true,
'divider' =>
[
'context' => 'posts.divider',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
],
],
],
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
],
'social' =>
[
'iconSet' => 'default',
'icons' =>
[
0 =>
[
'type' => 'socialIcon',
'iconType' => 'facebook',
'link' => 'http://www.facebook.com',
'image' => $this->social_icon_url . '/01-social/Facebook.png',
'height' => '32px',
'width' => '32px',
'text' => 'Facebook',
],
1 =>
[
'type' => 'socialIcon',
'iconType' => 'twitter',
'link' => 'http://www.twitter.com',
'image' => $this->social_icon_url . '/01-social/Twitter.png',
'height' => '32px',
'width' => '32px',
'text' => 'Twitter',
],
],
],
'spacer' =>
[
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '80px',
],
],
'type' => 'spacer',
],
'header' =>
[
'text' => '' . __("View this in your browser.", 'mailpoet') . '',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
'text' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
],
'link' =>
[
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
],
],
],
],
];
}
}