PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 All 83 releases
← All changes | app/Services/BlockDataService.php +17 -0 3.0.14.2trunk View file →
@@ -39,8 +39,11 @@
39 39 'per_page' => 10,
40 40 'columns' => 3,
41 41 'title' => 'Our Trips',
42 42 'show_pagination' => true,
43 + // Per-instance card layout. 'inherit' = use the site-wide setting.
44 + 'card_layout' => 'inherit',
45 + 'cardLayout' => '',
43 46 'destinationIds' => [],
44 47 'activityIds' => [],
45 48 'categoryIds' => [],
46 49 'difficultyIds' => [],
@@ -186,8 +189,22 @@
186 189
187 190 $atts['title'] = sanitize_text_field((string) ($atts['title'] ?? 'Our Trips'));
188 191
189 192 $atts['show_pagination'] = self::coerceToBool($atts['show_pagination'] ?? true, true) ? 'yes' : 'no';
193 +
194 + // Card layout override. Accept camelCase (Gutenberg block: cardLayout)
195 + // and snake_case (shortcode: card_layout). Unknown/empty/"inherit" keeps
196 + // 'inherit' so the template falls back to the site-wide Design setting.
197 + $cardLayoutRaw = '';
198 + if (isset($atts['cardLayout']) && is_string($atts['cardLayout']) && $atts['cardLayout'] !== '') {
199 + $cardLayoutRaw = $atts['cardLayout'];
200 + } elseif (isset($atts['card_layout']) && is_string($atts['card_layout']) && $atts['card_layout'] !== '') {
201 + $cardLayoutRaw = $atts['card_layout'];
202 + }
203 + $cardLayoutRaw = strtolower(trim($cardLayoutRaw));
204 + $atts['card_layout'] = in_array($cardLayoutRaw, ['standard', 'compact_mobile', 'compact_all'], true)
205 + ? $cardLayoutRaw
206 + : 'inherit';
190 207
191 208 // Featured Priority (matches admin form: featured | new | limited; "none"/empty = no filter).
192 209 // Accept both snake_case (shortcode) and camelCase (Gutenberg block attribute).
193 210 $featuredPriorityRaw = '';