template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/dog-food';
$this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons';
}
public function get() {
return [
'name' => __("Dog Food", 'mailpoet'),
'categories' => json_encode(['woocommerce', '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' => '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' => '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' => '20px',
],
],
],
1 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Dog-Logo.png',
'alt' => 'Dog-Logo',
'fullWidth' => false,
'width' => '42px',
'height' => '91px',
'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' => '31px',
],
],
],
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' => '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' => '25px',
],
],
],
1 =>
[
'type' => 'text',
'text' => '
Thanks for buying your dog food from us
',
],
],
],
],
],
3 =>
[
'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 . '/Dog-Header-1024x409.jpg',
'alt' => 'Dog-Header',
'fullWidth' => true,
'width' => '1280px',
'height' => '511px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
2 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '50px',
],
],
],
3 =>
[
'type' => 'text',
'text' => 'Here\'s some other pawsome things to try...
',
],
4 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
],
],
],
],
4 =>
[
'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' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Dog-Product-1.jpg',
'alt' => 'Dog-Product-1',
'fullWidth' => false,
'width' => '500px',
'height' => '500px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'Dog Jumper
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a elementum ex.
$19.99
',
],
2 =>
[
'type' => 'button',
'text' => 'Check it out',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#f6f6f6',
'borderColor' => '#000000',
'borderWidth' => '3px',
'borderRadius' => '40px',
'borderStyle' => 'solid',
'width' => '113px',
'lineHeight' => '28px',
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '14px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
],
],
],
1 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Dog-Product-2.jpg',
'alt' => 'Dog-Product-2',
'fullWidth' => false,
'width' => '500px',
'height' => '500px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'Dog Socks
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a elementum ex.
$19.99
',
],
2 =>
[
'type' => 'button',
'text' => 'Check it out',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#f6f6f6',
'borderColor' => '#000000',
'borderWidth' => '3px',
'borderRadius' => '40px',
'borderStyle' => 'solid',
'width' => '113px',
'lineHeight' => '28px',
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '14px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
],
],
],
2 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Dog-Product-3.jpg',
'alt' => 'Dog-Product-3',
'fullWidth' => false,
'width' => '500px',
'height' => '500px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'Glow Collar
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a elementum ex.
$19.99
',
],
2 =>
[
'type' => 'button',
'text' => 'Check it out',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#f6f6f6',
'borderColor' => '#000000',
'borderWidth' => '3px',
'borderRadius' => '40px',
'borderStyle' => 'solid',
'width' => '113px',
'lineHeight' => '28px',
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '14px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
],
],
],
],
],
5 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#000000',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#ffffff',
'height' => '45px',
],
],
],
1 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '35px',
],
],
],
2 =>
[
'type' => 'text',
'text' => 'Our Guarantee
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a elementum ex. Aliquam mollis metus ac nisl luctus pulvinar. Donec tincidunt pharetra sem, nec eleifend augue. Morbi id nunc commodo, tempor erat et, pretium neque. Vivamus ante sapien, consequat vitae ante quis, facilisis pellentesque mi. Praesent at scelerisque leo. Donec elementum mi consequat, ultrices lorem nec, vestibulum arcu. Aenean id libero vitae felis consequat maximus
',
],
3 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
],
],
],
],
6 =>
[
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#d4d4d4',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#d4d4d4',
'height' => '20px',
],
],
],
1 =>
[
'type' => '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',
],
],
],
],
],
],
],
],
],
'globalStyles' =>
[
'text' =>
[
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '12px',
],
'h1' =>
[
'fontColor' => '#111111',
'fontFamily' => 'Arial',
'fontSize' => '40px',
],
'h2' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '24px',
],
'h3' =>
[
'fontColor' => '#333333',
'fontFamily' => 'Arial',
'fontSize' => '18px',
],
'link' =>
[
'fontColor' => '#21759B',
'textDecoration' => 'underline',
],
'wrapper' =>
[
'backgroundColor' => '#ffffff',
],
'body' =>
[
'backgroundColor' => '#d4d4d4',
],
],
'blockDefaults' =>
[
'automatedLatestContent' =>
[
'amount' => '5',
'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' => 'Check it out',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#f6f6f6',
'borderColor' => '#000000',
'borderWidth' => '3px',
'borderRadius' => '40px',
'borderStyle' => 'solid',
'width' => '113px',
'lineHeight' => '28px',
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '14px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
'type' => 'button',
],
'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',
],
],
'type' => 'footer',
],
'posts' =>
[
'amount' => '10',
'contentType' => 'post',
'postStatus' => 'publish',
'inclusionType' => 'include',
'displayType' => 'excerpt',
'titleFormat' => 'h1',
'titleAlignment' => 'left',
'titleIsLink' => false,
'imageFullWidth' => false,
'featuredImagePosition' => 'belowTitle',
'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' => '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',
],
],
'type' => 'social',
],
'spacer' =>
[
'styles' =>
[
'block' =>
[
'backgroundColor' => '#d4d4d4',
'height' => '20px',
],
],
'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',
],
],
],
],
];
}
}