PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.5
YayMail – WooCommerce Email Customizer v4.4.5
4.4.6 4.4.5 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 All 57 releases
← All changes | src/Elements/OrderProgress.php +55 -38 4.4.1 → 4.4.5 View file →
@@ -15,46 +15,47 @@
15 15
16 16 public $available_email_ids = [ YAYMAIL_WITH_ORDER_EMAILS ];
17 17
18 18 public static function get_data( $attributes = [] ) {
19 - $default_icon = esc_url( YAYMAIL_PLUGIN_URL . 'assets/images/union.png' );
19 + self::$icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3,2.5h14v1.75H3Z"/><path fill-rule="evenodd" d="M3.5,4.25h13v6.5h-13ZM4.25,5h11.5v5h-11.5Z"/><path d="M9.5,2.5h1v8.25h-1Z"/><path d="M4,15.5h12v.6H4Z"/><path d="M2.5,15.8a1.8,1.8 0 1,0 3.6,0a1.8,1.8 0 1,0 -3.6,0Z"/><path fill-rule="evenodd" d="M8.2,15.8a1.8,1.8 0 1,0 3.6,0a1.8,1.8 0 1,0 -3.6,0ZM9.15,15.8a.85,.85 0 1,1 1.7,0a.85,.85 0 1,1 -1.7,0Z"/><path fill-rule="evenodd" d="M13.7,15.8a1.8,1.8 0 1,0 3.6,0a1.8,1.8 0 1,0 -3.6,0ZM14.65,15.8a.85,.85 0 1,1 1.7,0a.85,.85 0 1,1 -1.7,0Z"/></svg>';
20 20
21 - self::$icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3,2.5h14v1.75H3Z"/><path fill-rule="evenodd" d="M3.5,4.25h13v6.5h-13ZM4.25,5h11.5v5h-11.5Z"/><path d="M9.5,2.5h1v8.25h-1Z"/><path d="M4,15.5h12v.6H4Z"/><path d="M2.5,15.8a1.8,1.8 0 1,0 3.6,0a1.8,1.8 0 1,0 -3.6,0Z"/><path fill-rule="evenodd" d="M8.2,15.8a1.8,1.8 0 1,0 3.6,0a1.8,1.8 0 1,0 -3.6,0ZM9.15,15.8a.85,.85 0 1,1 1.7,0a.85,.85 0 1,1 -1.7,0Z"/><path fill-rule="evenodd" d="M13.7,15.8a1.8,1.8 0 1,0 3.6,0a1.8,1.8 0 1,0 -3.6,0ZM14.65,15.8a.85,.85 0 1,1 1.7,0a.85,.85 0 1,1 -1.7,0Z"/></svg>';
21 + $default_icon = esc_url( YAYMAIL_PLUGIN_URL . 'assets/images/check.png' );
22 22
23 + $inactive_step_fields = [
24 + 'image_url' => $default_icon,
25 + 'image_bg_color' => '#E2E6EE',
26 + 'icon_border_color' => '#E2E6EE',
27 + 'icon_border_style' => 'solid',
28 + 'icon_border_width' => 2,
29 + ];
30 +
31 + $active_step_fields = [
32 + 'image_url' => $default_icon,
33 + 'image_bg_color' => '#873eff',
34 + 'icon_border_color' => '#873eff',
35 + 'icon_border_style' => 'solid',
36 + 'icon_border_width' => 2,
37 + ];
38 +
23 39 $default_steps = [
24 - [
25 - 'title' => __( 'Ordered', 'yaymail' ),
26 - 'label_active_color' => '#636363',
27 - 'label_inactive_color' => '#71717a',
28 - 'image_active_url' => $default_icon,
29 - 'image_inactive_url' => $default_icon,
30 - 'image_bg_color' => '#873eff',
31 - 'filled_bar_icon_border_radius' => '50',
32 - 'filled_bar_icon_border_color_active' => '#636363',
33 - 'filled_bar_icon_border_color_inactive' => '#e9d5ff',
34 - ],
35 - [
36 - 'title' => __( 'Processing', 'yaymail' ),
37 - 'label_active_color' => '#636363',
38 - 'label_inactive_color' => '#71717a',
39 - 'image_active_url' => $default_icon,
40 - 'image_inactive_url' => $default_icon,
41 - 'image_bg_color' => '#873eff',
42 - 'filled_bar_icon_border_radius' => '50',
43 - 'filled_bar_icon_border_color_active' => '#c4b5fd',
44 - 'filled_bar_icon_border_color_inactive' => '#e9d5ff',
45 - ],
46 - [
47 - 'title' => __( 'Completed', 'yaymail' ),
48 - 'label_active_color' => '#636363',
49 - 'label_inactive_color' => '#71717a',
50 - 'image_active_url' => $default_icon,
51 - 'image_inactive_url' => $default_icon,
52 - 'image_bg_color' => '#873eff',
53 - 'filled_bar_icon_border_radius' => '50',
54 - 'filled_bar_icon_border_color_active' => '#c4b5fd',
55 - 'filled_bar_icon_border_color_inactive' => '#e9d5ff',
56 - ],
40 + array_merge(
41 + [
42 + 'title' => __( 'Ordered', 'yaymail' ),
43 + ],
44 + $active_step_fields
45 + ),
46 + array_merge(
47 + [
48 + 'title' => __( 'Processing', 'yaymail' ),
49 + ],
50 + $inactive_step_fields
51 + ),
52 + array_merge(
53 + [
54 + 'title' => __( 'Completed', 'yaymail' ),
55 + ],
56 + $inactive_step_fields
57 + ),
57 58 ];
58 59
59 60 return [
60 61 'id' => uniqid(),
@@ -123,9 +124,9 @@
123 124 ],
124 125 'current_step_index' => [
125 126 'value_path' => 'current_step_index',
126 127 'component' => 'OrderProgressCurrentStep',
127 - 'title' => __( 'Current step', 'yaymail' ),
128 + 'title' => __( 'Active step', 'yaymail' ),
128 129 'description' => __( 'Choose the active step.', 'yaymail' ),
129 130 'default_value' => isset( $attributes['current_step_index'] ) ? $attributes['current_step_index'] : 0,
130 131 'type' => 'content',
131 132 ],
@@ -156,8 +157,24 @@
156 157 'title' => __( 'Connector color (inactive)', 'yaymail' ),
157 158 'default_value' => isset( $attributes['connector_inactive_color'] ) ? $attributes['connector_inactive_color'] : '#E2E6EE',
158 159 ]
159 160 ),
161 + 'label_active_color' => ElementsHelper::get_color(
162 + $attributes,
163 + [
164 + 'value_path' => 'label_active_color',
165 + 'title' => __( 'Label color (active)', 'yaymail' ),
166 + 'default_value' => isset( $attributes['label_active_color'] ) ? $attributes['label_active_color'] : '#111827',
167 + ]
168 + ),
169 + 'label_inactive_color' => ElementsHelper::get_color(
170 + $attributes,
171 + [
172 + 'value_path' => 'label_inactive_color',
173 + 'title' => __( 'Label color (inactive)', 'yaymail' ),
174 + 'default_value' => isset( $attributes['label_inactive_color'] ) ? $attributes['label_inactive_color'] : '#9CA3AF',
175 + ]
176 + ),
160 177 'icon_size' => ElementsHelper::get_dimension(
161 178 $attributes,
162 179 [
163 180 'value_path' => 'icon_size',
@@ -203,9 +220,9 @@
203 220 ],
204 221 'appearance_group_definition' => [
205 222 'component' => 'GroupDefinition',
206 223 'title' => __( 'Appearance', 'yaymail' ),
207 - 'description' => __( 'Handle step label colors and icon background color.', 'yaymail' ),
224 + 'description' => __( 'Handle per-step icon and background colors.', 'yaymail' ),
208 225 ],
209 226 'steps' => [
210 227 'value_path' => 'steps',
211 228 'component' => 'OrderProgressSteps',
@@ -215,5 +232,5 @@
215 232 ],
216 233 ],
217 234 ];
218 235 }
219 -}
236 +}