PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/blocks/content-timeline/block.php +104 -29 2.13.1 → 2.14.0 View file →
@@ -27,51 +27,66 @@
27 27 $css_generator->add_class_styles(
28 28 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks-icon-maker svg',
29 29 $this->get_content_timeline_icon_css( $attributes ),
30 30 $this->get_content_timeline_icon_css( $attributes, 'Tablet' ),
31 - $this->get_content_timeline_icon_css( $attributes, 'Mobile' )
31 + $this->get_content_timeline_icon_css( $attributes, 'Mobile' ),
32 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_icon_css( $attributes, $device ); } )
32 33 );
33 34 $css_generator->add_class_styles(
34 35 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks__in-view-icon .ablocks-icon-wrap',
35 36 $this->get_content_timeline_icon_background_css( $attributes ),
36 37 $this->get_content_timeline_icon_background_css( $attributes, 'Tablet' ),
37 - $this->get_content_timeline_icon_background_css( $attributes, 'Mobile' )
38 + $this->get_content_timeline_icon_background_css( $attributes, 'Mobile' ),
39 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_icon_background_css( $attributes, $device ); } )
38 40 );
39 41 $css_generator->add_class_styles(
40 42 '{{WRAPPER}} .ablocks-block-content-timeline .ablocks-block-content-timeline__line',
41 43 $this->get_content_timeline_connector_css( $attributes ),
42 44 $this->get_content_timeline_connector_css( $attributes, 'Tablet' ),
43 - $this->get_content_timeline_connector_css( $attributes, 'Mobile' )
45 + $this->get_content_timeline_connector_css( $attributes, 'Mobile' ),
46 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_connector_css( $attributes, $device ); } )
44 47 );
45 48 $css_generator->add_class_styles(
46 49 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks-block-content-timeline-child--field',
47 50 $this->get_content_timeline_item_gap_css( $attributes ),
48 51 $this->get_content_timeline_item_gap_css( $attributes, 'Tablet' ),
49 - $this->get_content_timeline_item_gap_css( $attributes, 'Mobile' )
52 + $this->get_content_timeline_item_gap_css( $attributes, 'Mobile' ),
53 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_item_gap_css( $attributes, $device ); } )
50 54 );
51 55 $css_generator->add_class_styles(
56 + '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap',
57 + $this->get_content_timeline_horizontal_gap_css( $attributes ),
58 + $this->get_content_timeline_horizontal_gap_css( $attributes, 'Tablet' ),
59 + $this->get_content_timeline_horizontal_gap_css( $attributes, 'Mobile' ),
60 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_horizontal_gap_css( $attributes, $device ); } )
61 + );
62 + $css_generator->add_class_styles(
52 63 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks-block-content-timeline-child--field .ablocks-block-content-timeline-child__content-part',
53 64 $this->get_content_timeline_content_css( $attributes ),
54 65 $this->get_content_timeline_content_css( $attributes, 'Tablet' ),
55 - $this->get_content_timeline_content_css( $attributes, 'Mobile' )
66 + $this->get_content_timeline_content_css( $attributes, 'Mobile' ),
67 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_content_css( $attributes, $device ); } )
56 68 );
57 69 $css_generator->add_class_styles(
58 70 '{{WRAPPER}} .ablocks-block-content-timeline-child__content-part .ablocks-block-content-timeline-child__arrow::after',
59 71 $this->get_content_timeline_content_background_css( $attributes ),
60 72 $this->get_content_timeline_content_background_css( $attributes, 'Tablet' ),
61 - $this->get_content_timeline_content_background_css( $attributes, 'Mobile' )
73 + $this->get_content_timeline_content_background_css( $attributes, 'Mobile' ),
74 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_content_background_css( $attributes, $device ); } )
62 75 );
63 76 $css_generator->add_class_styles(
64 77 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks__in-view-icon',
65 78 $this->get_content_timeline_connector_alignment_css( $attributes ),
66 79 $this->get_content_timeline_connector_alignment_css( $attributes, 'Tablet' ),
67 - $this->get_content_timeline_connector_alignment_css( $attributes, 'Mobile' )
80 + $this->get_content_timeline_connector_alignment_css( $attributes, 'Mobile' ),
81 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_connector_alignment_css( $attributes, $device ); } )
68 82 );
69 83 $css_generator->add_class_styles(
70 84 '{{WRAPPER}} .ablocks-block-content-timeline-child__date',
71 85 $this->get_content_timeline_date_alignment_css( $attributes ),
72 86 $this->get_content_timeline_date_alignment_css( $attributes, 'Tablet' ),
73 - $this->get_content_timeline_date_alignment_css( $attributes, 'Mobile' )
87 + $this->get_content_timeline_date_alignment_css( $attributes, 'Mobile' ),
88 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_date_alignment_css( $attributes, $device ); } )
74 89 );
75 90 // Conditional CSS generation based on arrowAlignment
76 91
77 92 $css_generator->add_class_styles(
@@ -77,15 +92,17 @@
77 92 $css_generator->add_class_styles(
78 93 '{{WRAPPER}} .ablocks-block-content-timeline-child--line-center .ablocks-block-content-timeline-child__arrow',
79 94 $this->get_content_timeline_arrow_css( $attributes ),
80 95 $this->get_content_timeline_arrow_css( $attributes, 'Tablet' ),
81 - $this->get_content_timeline_arrow_css( $attributes, 'Mobile' )
96 + $this->get_content_timeline_arrow_css( $attributes, 'Mobile' ),
97 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_arrow_css( $attributes, $device ); } )
82 98 );
83 99 $css_generator->add_class_styles(
84 100 '{{WRAPPER}} .ablocks-block-content-timeline-child__date,.ablocks-block-content-timeline-child__inner-content-date',
85 101 $this->get_content_timeline_date_css( $attributes ),
86 102 $this->get_content_timeline_date_css( $attributes, 'Tablet' ),
87 - $this->get_content_timeline_date_css( $attributes, 'Mobile' )
103 + $this->get_content_timeline_date_css( $attributes, 'Mobile' ),
104 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_date_css( $attributes, $device ); } )
88 105 );
89 106 $css_generator->add_class_styles(
90 107 '{{WRAPPER}} .ablocks-block-content-timeline-child__inner-content-date',
91 108 $this->get_content_timeline_date_mobile_css( $attributes, 'Mobile' )
@@ -97,27 +114,31 @@
97 114 $css_generator->add_class_styles(
98 115 '{{WRAPPER}} .ablocks-block-content-timeline-child__date-inner',
99 116 $this->get_content_timeline_show_date_center_css( $attributes, '' ),
100 117 $this->get_content_timeline_show_date_center_css( $attributes, 'Tablet' ),
101 - $this->get_content_timeline_show_date_center_css( $attributes, 'Mobile' )
118 + $this->get_content_timeline_show_date_center_css( $attributes, 'Mobile' ),
119 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_center_css( $attributes, $device ); } )
102 120 );
103 121 $css_generator->add_class_styles(
104 122 '{{WRAPPER}} .ablocks-block-content-timeline-child__date',
105 123 $this->get_content_timeline_show_date_left_right_css( $attributes, '' ),
106 124 $this->get_content_timeline_show_date_left_right_css( $attributes, 'Tablet' ),
107 - $this->get_content_timeline_show_date_left_right_css( $attributes, 'Mobile' )
125 + $this->get_content_timeline_show_date_left_right_css( $attributes, 'Mobile' ),
126 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_left_right_css( $attributes, $device ); } )
108 127 );
109 128 $css_generator->add_class_styles(
110 129 '{{WRAPPER}} .ablocks-block-content-timeline--left .ablocks-block-content-timeline__line,.ablocks-block-content-timeline--right .ablocks-block-content-timeline__line',
111 130 $this->get_content_timeline_show_date_left_right_line_css( $attributes, '' ),
112 131 $this->get_content_timeline_show_date_left_right_line_css( $attributes, 'Tablet' ),
113 - $this->get_content_timeline_show_date_left_right_line_css( $attributes, 'Mobile' )
132 + $this->get_content_timeline_show_date_left_right_line_css( $attributes, 'Mobile' ),
133 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_left_right_line_css( $attributes, $device ); } )
114 134 );
115 135 $css_generator->add_class_styles(
116 136 '{{WRAPPER}} .ablocks-block-content-timeline-child__inner-content-date',
117 137 $this->get_content_timeline_show_date_mobile_css( $attributes, '' ),
118 138 $this->get_content_timeline_show_date_mobile_css( $attributes, 'Tablet' ),
119 - $this->get_content_timeline_show_date_mobile_css( $attributes, 'Mobile' )
139 + $this->get_content_timeline_show_date_mobile_css( $attributes, 'Mobile' ),
140 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_mobile_css( $attributes, $device ); } )
120 141 );
121 142
122 143 return $css_generator->generate_css();
123 144 }
@@ -128,51 +149,66 @@
128 149 $css_generator->add_class_styles(
129 150 '{{WRAPPER}} .ablocks-icon-maker svg',
130 151 $this->get_content_timeline_icon_css( $attributes ),
131 152 $this->get_content_timeline_icon_css( $attributes, 'Tablet' ),
132 - $this->get_content_timeline_icon_css( $attributes, 'Mobile' )
153 + $this->get_content_timeline_icon_css( $attributes, 'Mobile' ),
154 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_icon_css( $attributes, $device ); } )
133 155 );
134 156 $css_generator->add_class_styles(
135 157 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks__in-view-icon',
136 158 $this->get_content_timeline_icon_background_css( $attributes ),
137 159 $this->get_content_timeline_icon_background_css( $attributes, 'Tablet' ),
138 - $this->get_content_timeline_icon_background_css( $attributes, 'Mobile' )
160 + $this->get_content_timeline_icon_background_css( $attributes, 'Mobile' ),
161 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_icon_background_css( $attributes, $device ); } )
139 162 );
140 163 $css_generator->add_class_styles(
141 164 '{{WRAPPER}} .ablocks-block-content-timeline .ablocks-block-content-timeline__line',
142 165 $this->get_content_timeline_connector_css( $attributes ),
143 166 $this->get_content_timeline_connector_css( $attributes, 'Tablet' ),
144 - $this->get_content_timeline_connector_css( $attributes, 'Mobile' )
167 + $this->get_content_timeline_connector_css( $attributes, 'Mobile' ),
168 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_connector_css( $attributes, $device ); } )
145 169 );
146 170 $css_generator->add_class_styles(
147 171 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks-block-content-timeline-child--field',
148 172 $this->get_content_timeline_item_gap_css( $attributes ),
149 173 $this->get_content_timeline_item_gap_css( $attributes, 'Tablet' ),
150 - $this->get_content_timeline_item_gap_css( $attributes, 'Mobile' )
174 + $this->get_content_timeline_item_gap_css( $attributes, 'Mobile' ),
175 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_item_gap_css( $attributes, $device ); } )
151 176 );
152 177 $css_generator->add_class_styles(
178 + '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap',
179 + $this->get_content_timeline_horizontal_gap_css( $attributes ),
180 + $this->get_content_timeline_horizontal_gap_css( $attributes, 'Tablet' ),
181 + $this->get_content_timeline_horizontal_gap_css( $attributes, 'Mobile' ),
182 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_horizontal_gap_css( $attributes, $device ); } )
183 + );
184 + $css_generator->add_class_styles(
153 185 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks-block-content-timeline-child--field .ablocks-block-content-timeline-child__content-part',
154 186 $this->get_content_timeline_content_css( $attributes ),
155 187 $this->get_content_timeline_content_css( $attributes, 'Tablet' ),
156 - $this->get_content_timeline_content_css( $attributes, 'Mobile' )
188 + $this->get_content_timeline_content_css( $attributes, 'Mobile' ),
189 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_content_css( $attributes, $device ); } )
157 190 );
158 191 $css_generator->add_class_styles(
159 192 '{{WRAPPER}} .ablocks-block-content-timeline-child__content-part .ablocks-block-content-timeline-child__arrow::after',
160 193 $this->get_content_timeline_content_background_css( $attributes ),
161 194 $this->get_content_timeline_content_background_css( $attributes, 'Tablet' ),
162 - $this->get_content_timeline_content_background_css( $attributes, 'Mobile' )
195 + $this->get_content_timeline_content_background_css( $attributes, 'Mobile' ),
196 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_content_background_css( $attributes, $device ); } )
163 197 );
164 198 $css_generator->add_class_styles(
165 199 '{{WRAPPER}} .ablocks-block-content-timeline--outer-wrap .ablocks__in-view-icon',
166 200 $this->get_content_timeline_connector_alignment_css( $attributes ),
167 201 $this->get_content_timeline_connector_alignment_css( $attributes, 'Tablet' ),
168 - $this->get_content_timeline_connector_alignment_css( $attributes, 'Mobile' )
202 + $this->get_content_timeline_connector_alignment_css( $attributes, 'Mobile' ),
203 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_connector_alignment_css( $attributes, $device ); } )
169 204 );
170 205 $css_generator->add_class_styles(
171 206 '{{WRAPPER}} .ablocks-block-content-timeline-child__date',
172 207 $this->get_content_timeline_date_alignment_css( $attributes ),
173 208 $this->get_content_timeline_date_alignment_css( $attributes, 'Tablet' ),
174 - $this->get_content_timeline_date_alignment_css( $attributes, 'Mobile' )
209 + $this->get_content_timeline_date_alignment_css( $attributes, 'Mobile' ),
210 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_date_alignment_css( $attributes, $device ); } )
175 211 );
176 212 // Conditional CSS generation based on arrowAlignment
177 213
178 214 $css_generator->add_class_styles(
@@ -178,15 +214,17 @@
178 214 $css_generator->add_class_styles(
179 215 '{{WRAPPER}} .ablocks-block-content-timeline-child--line-center .ablocks-block-content-timeline-child__arrow',
180 216 $this->get_content_timeline_arrow_css( $attributes ),
181 217 $this->get_content_timeline_arrow_css( $attributes, 'Tablet' ),
182 - $this->get_content_timeline_arrow_css( $attributes, 'Mobile' )
218 + $this->get_content_timeline_arrow_css( $attributes, 'Mobile' ),
219 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_arrow_css( $attributes, $device ); } )
183 220 );
184 221 $css_generator->add_class_styles(
185 222 '{{WRAPPER}} .ablocks-block-content-timeline-child__date,.ablocks-block-content-timeline-child__inner-content-date',
186 223 $this->get_content_timeline_date_css( $attributes ),
187 224 $this->get_content_timeline_date_css( $attributes, 'Tablet' ),
188 - $this->get_content_timeline_date_css( $attributes, 'Mobile' )
225 + $this->get_content_timeline_date_css( $attributes, 'Mobile' ),
226 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_date_css( $attributes, $device ); } )
189 227 );
190 228 $css_generator->add_class_styles(
191 229 '{{WRAPPER}} .ablocks-block-content-timeline-child__inner-content-date',
192 230 $this->get_content_timeline_date_mobile_css( $attributes, 'Mobile' )
@@ -198,27 +236,31 @@
198 236 $css_generator->add_class_styles(
199 237 '{{WRAPPER}} .ablocks-block-content-timeline-child__date-inner',
200 238 $this->get_content_timeline_show_date_center_css( $attributes, '' ),
201 239 $this->get_content_timeline_show_date_center_css( $attributes, 'Tablet' ),
202 - $this->get_content_timeline_show_date_center_css( $attributes, 'Mobile' )
240 + $this->get_content_timeline_show_date_center_css( $attributes, 'Mobile' ),
241 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_center_css( $attributes, $device ); } )
203 242 );
204 243 $css_generator->add_class_styles(
205 244 '{{WRAPPER}} .ablocks-block-content-timeline-child__date',
206 245 $this->get_content_timeline_show_date_left_right_css( $attributes, '' ),
207 246 $this->get_content_timeline_show_date_left_right_css( $attributes, 'Tablet' ),
208 - $this->get_content_timeline_show_date_left_right_css( $attributes, 'Mobile' )
247 + $this->get_content_timeline_show_date_left_right_css( $attributes, 'Mobile' ),
248 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_left_right_css( $attributes, $device ); } )
209 249 );
210 250 $css_generator->add_class_styles(
211 251 '{{WRAPPER}} .ablocks-block-content-timeline--left .ablocks-block-content-timeline__line,.ablocks-block-content-timeline--right .ablocks-block-content-timeline__line',
212 252 $this->get_content_timeline_show_date_left_right_line_css( $attributes, '' ),
213 253 $this->get_content_timeline_show_date_left_right_line_css( $attributes, 'Tablet' ),
214 - $this->get_content_timeline_show_date_left_right_line_css( $attributes, 'Mobile' )
254 + $this->get_content_timeline_show_date_left_right_line_css( $attributes, 'Mobile' ),
255 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_left_right_line_css( $attributes, $device ); } )
215 256 );
216 257 $css_generator->add_class_styles(
217 258 '{{WRAPPER}} .ablocks-block-content-timeline-child__inner-content-date',
218 259 $this->get_content_timeline_show_date_mobile_css( $attributes, '' ),
219 260 $this->get_content_timeline_show_date_mobile_css( $attributes, 'Tablet' ),
220 - $this->get_content_timeline_show_date_mobile_css( $attributes, 'Mobile' )
261 + $this->get_content_timeline_show_date_mobile_css( $attributes, 'Mobile' ),
262 + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_timeline_show_date_mobile_css( $attributes, $device ); } )
221 263 );
222 264
223 265 return $css_generator->generate_css();
224 266 }
@@ -227,8 +269,29 @@
227 269 return $this->build_css_v2( $attributes );
228 270 }
229 271 return $this->build_css_v1( $attributes );
230 272 }
273 + // Top / Bottom content positions lay the timeline out horizontally.
274 + public function is_horizontal_timeline( $attributes ) {
275 + return in_array( $attributes['contentPosition'] ?? '', [ 'top', 'bottom' ], true );
276 + }
277 +
278 + public function get_content_timeline_horizontal_gap_css( $attributes, $device = '' ) {
279 + if ( ! $this->is_horizontal_timeline( $attributes ) ) {
280 + return [];
281 + }
282 + return Range::get_css([
283 + 'attributeValue' => $attributes['itemGap'],
284 + 'attribute_object_key' => 'value',
285 + 'defaultValue' => 10,
286 + 'isResponsive' => true,
287 + 'hasUnit' => true,
288 + 'unitDefaultValue' => 'px',
289 + 'property' => 'gap',
290 + 'device' => $device,
291 + ]);
292 + }
293 +
231 294 public function get_content_timeline_show_date_mobile_css( $attributes, $device = '' ) {
232 295 $css = [];
233 296 if ( $device === '' || $device === 'Tablet' ) {
234 297 $css['display'] = 'none';
@@ -259,9 +322,9 @@
259 322 public function get_content_timeline_show_date_left_right_css( $attribute, $device ) {
260 323 $css = [];
261 324 $showDateKey = $device ? "showDate{$device}" : 'showDate';
262 325 $showDate = $attribute[ $showDateKey ] ?? null;
263 - $isLeftOrRight = in_array( $attribute['contentPosition'], [ 'left', 'right' ], true );
326 + $isLeftOrRight = in_array( $attribute['contentPosition'], [ 'left', 'right', 'top', 'bottom' ], true );
264 327
265 328 if ( $isLeftOrRight ) {
266 329 if ( $device !== 'Mobile' ) {
267 330 $css['display'] = $showDate ? 'block !important' : 'none !important';
@@ -385,8 +448,11 @@
385 448 );
386 449 }
387 450
388 451 public function get_content_timeline_item_gap_css( $attributes, $device = '' ) {
452 + if ( $this->is_horizontal_timeline( $attributes ) ) {
453 + return [ '--ablocks-content-timeline-icon-size' => ( ! empty( $attributes['iconBackgroundSize'] ) ? $attributes['iconBackgroundSize'] : 48 ) . 'px' ];
454 + }
389 455 $css = [];
390 456 return array_merge(
391 457 Range::get_css([
392 458 'attributeValue' => $attributes['itemGap'],
@@ -439,8 +505,11 @@
439 505 // }
440 506
441 507 public function get_content_timeline_arrow_css( $attributes, $device = '' ) {
442 508 $css = [];
509 + if ( $this->is_horizontal_timeline( $attributes ) ) {
510 + return $css;
511 + }
443 512 $arrowAlignment = $attributes['arrowAlignment'] ?? '';
444 513 $iconBackgroundSize = $attributes['iconBackgroundSize'] ?? '';
445 514
446 515 // Existing logic + updated styles
@@ -480,8 +549,14 @@
480 549 return $css;
481 550 }
482 551 public function get_content_timeline_date_alignment_css( $attributes, $device = '' ) {
483 552 $css = [];
553 + if ( $this->is_horizontal_timeline( $attributes ) ) {
554 + return [
555 + 'align-self' => 'stretch',
556 + 'text-align' => ! empty( $attributes['dateAlign'] ) ? $attributes['dateAlign'] : 'left',
557 + ];
558 + }
484 559
485 560 $arrowAlignment = $attributes['arrowAlignment'] ?? '';
486 561 $iconBackgroundSize = $attributes['iconBackgroundSize'] ?? '';
487 562