| 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 |
|