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 | resources/js/blocks/destination/edit.tsx +48 -1 3.0.4 → 3.0.17 View file →
@@ -20,8 +20,13 @@
20 20 show_pagination: boolean;
21 21 destinationIds: number[];
22 22 destination_ids?: string;
23 23 destination?: string;
24 + show_trip_count: boolean;
25 + show_description: boolean;
26 + show_image: boolean;
27 + hide_empty: boolean;
28 + featured_only: boolean;
24 29 }
25 30
26 31 interface EditProps {
27 32 attributes: DestinationBlockAttributes;
@@ -118,13 +123,55 @@
118 123 <ClassificationMultiSelect
119 124 taxonomy="destination"
120 125 label={__("Destinations to show", "yatra")}
121 126 help={__(
122 - "Pick \"All published\" for the full catalog; otherwise search and tick specific destinations.",
127 + 'Pick "All published" for the full catalog; otherwise search and tick specific destinations.',
123 128 "yatra",
124 129 )}
125 130 value={destinationIds}
126 131 onChange={(ids) => setAttributes({ destinationIds: ids })}
132 + />
133 + </PanelBody>
134 +
135 + <PanelBody title={__("Display options", "yatra")} initialOpen={false}>
136 + <ToggleControl
137 + label={__("Show trip count", "yatra")}
138 + checked={attributes.show_trip_count}
139 + onChange={(value: boolean) =>
140 + setAttributes({ show_trip_count: value })
141 + }
142 + />
143 + <ToggleControl
144 + label={__("Show description", "yatra")}
145 + checked={attributes.show_description}
146 + onChange={(value: boolean) =>
147 + setAttributes({ show_description: value })
148 + }
149 + />
150 + <ToggleControl
151 + label={__("Show image", "yatra")}
152 + checked={attributes.show_image}
153 + onChange={(value: boolean) => setAttributes({ show_image: value })}
154 + />
155 + <ToggleControl
156 + label={__("Hide empty destinations", "yatra")}
157 + help={__(
158 + "Skip destinations that have no published trips assigned. Off by default — turn on for a tighter live catalog, leave off for editorial / onboarding views.",
159 + "yatra",
160 + )}
161 + checked={attributes.hide_empty}
162 + onChange={(value: boolean) => setAttributes({ hide_empty: value })}
163 + />
164 + <ToggleControl
165 + label={__("Featured only (filter list)", "yatra")}
166 + help={__(
167 + "When on, only destinations marked as featured in Yatra → Destinations are listed.",
168 + "yatra",
169 + )}
170 + checked={attributes.featured_only}
171 + onChange={(value: boolean) =>
172 + setAttributes({ featured_only: value })
173 + }
127 174 />
128 175 </PanelBody>
129 176 </InspectorControls>
130 177