| @@ -1014,9 +1014,9 @@ | ||
| 1014 | 1014 | <?php |
| 1015 | 1015 | /* translators: 1: ... */ |
| 1016 | 1016 | echo wp_kses_post( sprintf( __( 'Enable %1$sAggregate only bookings%2$s option to aggregate only bookings without including unavailable dates from the %3$s page.', 'booking' ) |
| 1017 | 1017 | , '<strong>', '</strong>' |
| 1018 | - , '<strong>Booking > Availability > Days Availability</strong>' | |
| 1018 | + , '<strong>Booking > Availability > Block Dates</strong>' | |
| 1019 | 1019 | ) ); |
| 1020 | 1020 | ?> |
| 1021 | 1021 | |
| 1022 | 1022 | <?php |
| @@ -2141,8 +2141,61 @@ | ||
| 2141 | 2141 | 'auto_select_provider' => array( |
| 2142 | 2142 | 'section' => 'general', 'title' => __( 'Auto-select the only Provider', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => false, |
| 2143 | 2143 | 'description' => __( 'Skip Provider selection only when exactly one compatible Provider exists.', 'booking' ), |
| 2144 | 2144 | ), |
| 2145 | + 'catalog_layout' => array( | |
| 2146 | + 'section' => 'catalog', 'title' => __( 'Catalog layout', 'booking' ), 'type' => 'select', 'value_type' => 'text', 'default' => 'grid', | |
| 2147 | + 'options' => array( 'grid' => __( 'Responsive grid', 'booking' ), 'list' => __( 'List', 'booking' ) ), | |
| 2148 | + 'description' => __( 'Show Services and Providers as responsive cards or compact list items. Selecting List applies recommended display settings that you can adjust afterward.', 'booking' ), | |
| 2149 | + ), | |
| 2150 | + 'show_resource_filters' => array( | |
| 2151 | + 'section' => 'catalog', 'title' => __( 'Show catalog search', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => false, | |
| 2152 | + 'description' => __( 'Let visitors search the permitted Services or compatible Providers on the active selection screen.', 'booking' ), | |
| 2153 | + ), | |
| 2154 | + 'show_resource_image' => array( | |
| 2155 | + 'section' => 'catalog', 'title' => __( 'Show images', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => true, | |
| 2156 | + 'description' => __( 'Show configured Service pictures and Provider photos or generated initials.', 'booking' ), | |
| 2157 | + ), | |
| 2158 | + 'show_resource_title' => array( | |
| 2159 | + 'section' => 'catalog', 'title' => __( 'Show titles', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => true, | |
| 2160 | + 'description' => __( 'Show Service and Provider titles. Each title remains available to assistive technology when hidden.', 'booking' ), | |
| 2161 | + ), | |
| 2162 | + 'show_resource_description' => array( | |
| 2163 | + 'section' => 'catalog', 'title' => __( 'Show Service descriptions', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => true, | |
| 2164 | + 'description' => __( 'Show the public Service description when one is configured.', 'booking' ), | |
| 2165 | + ), | |
| 2166 | + 'catalog_item_width' => array( | |
| 2167 | + 'section' => 'catalog', 'title' => __( 'Catalog item width', 'booking' ), 'value_type' => 'css_width', 'default' => '', | |
| 2168 | + 'placeholder' => __( 'Automatic, 360px, or 50%', 'booking' ), | |
| 2169 | + 'description' => __( 'Optional explicit card or list-row width. Use px, %, em, rem, or vw. An items-per-row setting takes precedence for its active layout.', 'booking' ), | |
| 2170 | + ), | |
| 2171 | + 'catalog_item_max_width' => array( | |
| 2172 | + 'section' => 'catalog', 'title' => __( 'Maximum catalog item width', 'booking' ), 'type' => 'number', 'value_type' => 'positive_integer', 'default' => '', | |
| 2173 | + 'placeholder' => __( 'Automatic', 'booking' ), 'attr' => array( 'min' => 280, 'max' => 1200, 'step' => 1 ), | |
| 2174 | + 'description' => __( 'Optional maximum card or list-row width in pixels, from 280 through 1200. Leave empty to fill the available layout width.', 'booking' ), | |
| 2175 | + ), | |
| 2176 | + 'catalog_grid_items_per_row' => array( | |
| 2177 | + 'section' => 'catalog', 'title' => __( 'Grid items per row', 'booking' ), 'type' => 'number', 'value_type' => 'positive_integer', 'default' => '', | |
| 2178 | + 'placeholder' => __( 'Automatic', 'booking' ), 'attr' => array( 'min' => 1, 'max' => 12, 'step' => 1 ), | |
| 2179 | + 'description' => __( 'Optional exact number of equal-width items per row in the grid layout, from 1 through 12.', 'booking' ), | |
| 2180 | + ), | |
| 2181 | + 'catalog_list_items_per_row' => array( | |
| 2182 | + 'section' => 'catalog', 'title' => __( 'List items per row', 'booking' ), 'type' => 'number', 'value_type' => 'positive_integer', 'default' => '', | |
| 2183 | + 'placeholder' => __( 'One item per row', 'booking' ), 'attr' => array( 'min' => 1, 'max' => 12, 'step' => 1 ), | |
| 2184 | + 'description' => __( 'Optional number of equal-width items per row in the list layout, from 1 through 12. Empty keeps one item per row.', 'booking' ), | |
| 2185 | + ), | |
| 2186 | + 'show_resource_hierarchy' => array( | |
| 2187 | + 'section' => 'catalog', 'title' => __( 'Show Service relationship', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => true, | |
| 2188 | + 'description' => __( 'Explain that each listed Provider offers the selected Service.', 'booking' ), | |
| 2189 | + ), | |
| 2190 | + 'show_availability' => array( | |
| 2191 | + 'section' => 'catalog', 'title' => __( 'Show availability summary', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => true, | |
| 2192 | + 'description' => __( 'Show when a Provider has no weekly availability configured. Exact availability remains confirmed after dates are selected.', 'booking' ), | |
| 2193 | + ), | |
| 2194 | + 'show_starting_price' => array( | |
| 2195 | + 'section' => 'catalog', 'title' => __( 'Show starting price', 'booking' ), 'type' => 'checkbox', 'value_type' => 'boolean', 'default' => true, | |
| 2196 | + 'description' => __( 'Show the effective Service or Provider price when pricing is available in this edition.', 'booking' ), | |
| 2197 | + ), | |
| 2145 | 2198 | 'nummonths' => array( |
| 2146 | 2199 | 'section' => 'calendar', 'title' => __( 'Visible months', 'booking' ), 'type' => 'select', 'value_type' => 'positive_integer', 'default' => 1, 'options' => $month_options, |
| 2147 | 2200 | 'description' => __( 'Number of calendar months from 1 through 24.', 'booking' ), |
| 2148 | 2201 | ), |
| @@ -2216,8 +2269,25 @@ | ||
| 2216 | 2269 | 'description' => __( 'Description on the Provider selection screen. Clear it to hide the description.', 'booking' ), |
| 2217 | 2270 | ), |
| 2218 | 2271 | ); |
| 2219 | 2272 | |
| 2273 | + if ( ! function_exists( 'wpbc_is_11_6_features_enabled' ) || ! wpbc_is_11_6_features_enabled() ) { | |
| 2274 | + unset( | |
| 2275 | + $parameters['catalog_layout'], | |
| 2276 | + $parameters['show_resource_filters'], | |
| 2277 | + $parameters['show_resource_image'], | |
| 2278 | + $parameters['show_resource_title'], | |
| 2279 | + $parameters['show_resource_description'], | |
| 2280 | + $parameters['catalog_item_width'], | |
| 2281 | + $parameters['catalog_item_max_width'], | |
| 2282 | + $parameters['catalog_grid_items_per_row'], | |
| 2283 | + $parameters['catalog_list_items_per_row'], | |
| 2284 | + $parameters['show_resource_hierarchy'], | |
| 2285 | + $parameters['show_availability'], | |
| 2286 | + $parameters['show_starting_price'] | |
| 2287 | + ); | |
| 2288 | + } | |
| 2289 | + | |
| 2220 | 2290 | return $parameters; |
| 2221 | 2291 | } |
| 2222 | 2292 | |
| 2223 | 2293 | /** |
| @@ -2249,13 +2319,17 @@ | ||
| 2249 | 2319 | function wpbc_shortcode_config__content__booking_appointment() { |
| 2250 | 2320 | $shortcode_name = 'booking_appointment'; |
| 2251 | 2321 | $tabs = array( |
| 2252 | 2322 | 'general' => array( 'title' => __( 'Service & Provider', 'booking' ), 'icon' => 'wpbc-bi-person-check', 'default' => true ), |
| 2323 | + 'catalog' => array( 'title' => __( 'Catalog', 'booking' ), 'icon' => 'wpbc-bi-grid', 'default' => false ), | |
| 2253 | 2324 | 'calendar' => array( 'title' => __( 'Calendar & Form', 'booking' ), 'icon' => 'wpbc-bi-calendar3', 'default' => false ), |
| 2254 | 2325 | 'progress' => array( 'title' => __( 'Progress', 'booking' ), 'icon' => 'wpbc-bi-list-ol', 'default' => false ), |
| 2255 | 2326 | 'text' => array( 'title' => __( 'Screen Text', 'booking' ), 'icon' => 'wpbc-bi-card-text', 'default' => false ), |
| 2256 | 2327 | 'reference' => array( 'title' => __( 'Parameters', 'booking' ), 'icon' => 'wpbc-bi-code-square', 'default' => false ), |
| 2257 | 2328 | ); |
| 2329 | + if ( ! function_exists( 'wpbc_is_11_6_features_enabled' ) || ! wpbc_is_11_6_features_enabled() ) { | |
| 2330 | + unset( $tabs['catalog'] ); | |
| 2331 | + } | |
| 2258 | 2332 | $parameters = wpbc_shortcode_config__booking_appointment_parameters(); |
| 2259 | 2333 | ?> |
| 2260 | 2334 | <div id="wpbc_sc_container__shortcode_<?php echo esc_attr( $shortcode_name ); ?>" class="wpbc_sc_container__shortcode wpbc_sc_container__shortcode_<?php echo esc_attr( $shortcode_name ); ?>"> |
| 2261 | 2335 | <?php wpbc_shortcode_config__workflow_tabs( $shortcode_name, $tabs ); ?> |