PluginProbe
YayMail – WooCommerce Email Customizer / trunk
YayMail – WooCommerce Email Customizer vtrunk
4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 All 55 releases
yaymail / src / Emails / GlobalHeaderFooter.php

GlobalHeaderFooter.php in YayMail – WooCommerce Email Customizer trunk, at src/Emails/GlobalHeaderFooter.php

58 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace YayMail\Emails;
4
5 use YayMail\Abstracts\BaseEmail;
6 use YayMail\Elements\ElementsLoader;
7 use YayMail\Utils\SingletonTrait;
8
9 /**
10 * GlobalHeaderFooter Class
11 *
12 * This is an YayMail element, not an email template. But its customizer page (for editing, saving, etc...) shares the same logic as email template customizer.
13 *
14 * @method static GlobalHeaderFooter get_instance()
15 */
16 class GlobalHeaderFooter extends BaseEmail {
17 use SingletonTrait;
18
19 public $email_types = [ YAYMAIL_GLOBAL_HEADER_FOOTER_ID ];
20
21 protected function __construct() {
22 $this->id = 'yaymail_global_header_footer';
23 $this->title = __( 'Global header footer', 'yaymail' );
24 $this->recipient = __( 'Global header footer recipient placeholder', 'yaymail' );
25 }
26
27 public function get_default_elements() {
28 $default_elements = ElementsLoader::load_elements(
29 [
30 [
31 'type' => 'Heading',
32 'attributes' => [
33 'rich_text' => __( 'Email Heading', 'yaymail' ),
34 ],
35 ],
36 [
37 'type' => 'SkeletonDivider',
38 ],
39 [
40 'type' => 'Footer',
41 ],
42 ]
43 );
44
45 return $default_elements;
46 }
47
48 public function get_all_elements() {
49 return parent::get_elements();
50 }
51
52 public function get_template_file( $located, $template_name, $args ) {
53 }
54
55 public function get_template_path() {
56 }
57 }
58