| @@ -29,10 +29,17 @@ | ||
| 29 | 29 | $display_title = __('Featured Trips', 'yatra'); |
| 30 | 30 | } else { |
| 31 | 31 | $display_title = __('Our Trips', 'yatra'); |
| 32 | 32 | } |
| 33 | + | |
| 34 | +// Card layout: per-instance override (card_layout attr) falls back to the | |
| 35 | +// site-wide Design setting. Class goes on this wrapper so this listing's layout | |
| 36 | +// is independent of the global default and of other listings on the page. | |
| 37 | +$yatra_listing_layout_class = \Yatra\Providers\FrontendAssetsProvider::listingLayoutClasses( | |
| 38 | + \Yatra\Providers\FrontendAssetsProvider::resolveListingLayout((string) ($atts['card_layout'] ?? '')) | |
| 39 | +); | |
| 33 | 40 | ?> |
| 34 | -<div class="yatra-tour-shortcode" data-atts='<?php echo esc_attr(json_encode($atts)); ?>'> | |
| 41 | +<div class="yatra-tour-shortcode<?php echo $yatra_listing_layout_class ? ' ' . esc_attr($yatra_listing_layout_class) : ''; ?>" data-atts='<?php echo esc_attr(json_encode($atts)); ?>'> | |
| 35 | 42 | <div class="yatra-tour-header"> |
| 36 | 43 | <h2 class="yatra-tour-title"><?php echo esc_html($display_title); ?></h2> |
| 37 | 44 | <?php if (!empty($trip_items) && $total_found > 0) : ?> |
| 38 | 45 | <div class="yatra-tour-count"> |
| @@ -37,11 +44,12 @@ | ||
| 37 | 44 | <?php if (!empty($trip_items) && $total_found > 0) : ?> |
| 38 | 45 | <div class="yatra-tour-count"> |
| 39 | 46 | <?php |
| 40 | 47 | printf( |
| 41 | - esc_html__('Showing %d of %d trips', 'yatra'), | |
| 42 | - count($trip_items), | |
| 43 | - $total_found | |
| 48 | + /* translators: 1: number of trips shown, 2: total trips available. */ | |
| 49 | + esc_html__('Showing %1$d of %2$d trips', 'yatra'), | |
| 50 | + (int) count($trip_items), | |
| 51 | + (int) $total_found | |
| 44 | 52 | ); |
| 45 | 53 | ?> |
| 46 | 54 | </div> |
| 47 | 55 | <?php endif; ?> |