PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.4
YayMail – WooCommerce Email Customizer v4.3.4
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 / Elements / HTML.php

HTML.php in YayMail – WooCommerce Email Customizer 4.3.4, at src/Elements/HTML.php

59 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail\Elements;
3
4 use YayMail\Abstracts\BaseElement;
5 use YayMail\Utils\SingletonTrait;
6 /**
7 * HTML Elements
8 */
9 class HTML extends BaseElement {
10
11 use SingletonTrait;
12
13 protected static $type = 'html';
14
15 public $available_email_ids = [ YAYMAIL_ALL_EMAILS ];
16
17 public static function get_data( $attributes = [] ) {
18 self::$icon = '<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 20 20">
19 <defs>
20 <style>
21 .cls-1 {
22 fill: none;
23 }
24 </style>
25 </defs>
26 <path d="M17.5,2.5v15H2.5V2.5h15M18,1H2c-.55,0-1,.45-1,1v16c0,.55.45,1,1,1h16c.55,0,1-.45,1-1V2c0-.55-.45-1-1-1h0Z"/>
27 <g>
28 <g>
29 <polygon class="cls-1" points="6.42 9.97 4.49 8.03 4.49 11.9 6.42 9.97"/>
30 <path d="M8.01,9.44l-3.38-3.38s-.1-.07-.15-.1v2.07l1.94,1.94-1.94,1.94v2.05c.07-.04.14-.08.21-.14l3.32-3.32c.14-.14.22-.33.22-.53s-.08-.39-.22-.53Z"/>
31 </g>
32 <path d="M15.44,12.54h-7.12s-.04.01-.06.01v1.47s.04.01.06.01h7.12s.05-.01.08-.02v-1.47s-.05-.02-.08-.02Z"/>
33 </g>
34 </svg>';
35
36 return [
37 'id' => uniqid(),
38 'type' => self::$type,
39 'name' => __( 'HTML', 'yaymail' ),
40 'icon' => self::$icon,
41 'group' => 'basic',
42 'available' => true,
43 'position' => 140,
44 'data' => [
45 'rich_text' => [
46 'value_path' => 'rich_text',
47 'component' => 'TextInput',
48 'title' => __( 'HTML code', 'yaymail' ),
49 'default_value' => isset( $attributes['rich_text'] ) ? $attributes['rich_text'] : '<div>Welcome to[yaymail_site_name]</div>',
50 'placeholder' => __( 'Import HTML code', 'yaymail' ),
51 'multiple' => true,
52 'rows' => 10,
53 'type' => 'content',
54 ],
55 ],
56 ];
57 }
58 }
59