PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.17
Yatra – Travel Booking & Tour Operator Software v3.0.17
3.0.17 3.0.16 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 All 85 releases
← All changes | templates/partials/single-trip/content-faq.php +8 -4 3.0.2.7 → 3.0.17 View file →
@@ -36,9 +36,9 @@
36 36 }
37 37 </script>
38 38 <div class="faq-header">
39 39 <h2 class="yatra-trip-section-title">
40 - <?php yatra_render_tab_icon($tab->icon ?? null, 'help-circle', 'yatra-trip-section-title-icon', $tab->label ?? 'FAQ'); ?>
40 + <?php yatra_render_tab_icon($tab->icon ?? null, 'help-circle', 'yatra-trip-section-title-icon', $tab->label ?? __('FAQ', 'yatra')); ?>
41 41 <?php echo esc_html(isset($tab->label) ? $tab->label : __('Frequently Asked Questions', 'yatra')); ?>
42 42 </h2>
43 43 <div class="faq-controls">
44 44 <button type="button" class="faq-toggle-btn" id="faq-toggle-all">
@@ -47,9 +47,9 @@
47 47 </svg>
48 48 <svg width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24" class="toggle-icon collapse-icon" aria-hidden="true">
49 49 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 9V4.5M9 9H4.5M9 9L3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5l5.25 5.25"/>
50 50 </svg>
51 - <span class="toggle-text">Expand All</span>
51 + <span class="toggle-text"><?php echo esc_html__('Expand All', 'yatra'); ?></span>
52 52 </button>
53 53 </div>
54 54 </div>
55 55
@@ -92,8 +92,12 @@
92 92
93 93 <script>
94 94 (function () {
95 95 let faqIsAllExpanded = false;
96 + const yatraFaqI18n = {
97 + expandAll: <?php echo wp_json_encode(__('Expand All', 'yatra')); ?>,
98 + collapseAll: <?php echo wp_json_encode(__('Collapse All', 'yatra')); ?>
99 + };
96 100
97 101 function toggleFAQ(button) {
98 102 var item = button.closest('.faq-item');
99 103 if (!item) return;
@@ -120,9 +124,9 @@
120 124 var q = item.querySelector('.faq-question');
121 125 if (q) q.setAttribute('aria-expanded', 'false');
122 126 });
123 127 toggleBtn.classList.remove('is-all-expanded');
124 - if (toggleText) toggleText.textContent = 'Expand All';
128 + if (toggleText) toggleText.textContent = yatraFaqI18n.expandAll;
125 129 } else {
126 130 items.forEach(function (item) {
127 131 item.classList.add('active');
128 132 var q = item.querySelector('.faq-question');
@@ -128,9 +132,9 @@
128 132 var q = item.querySelector('.faq-question');
129 133 if (q) q.setAttribute('aria-expanded', 'true');
130 134 });
131 135 toggleBtn.classList.add('is-all-expanded');
132 - if (toggleText) toggleText.textContent = 'Collapse All';
136 + if (toggleText) toggleText.textContent = yatraFaqI18n.collapseAll;
133 137 }
134 138 faqIsAllExpanded = !faqIsAllExpanded;
135 139 }
136 140