| 1 |
<?php |
| 2 |
/** |
| 3 |
* Booking Calendar release feature gates. |
| 4 |
* |
| 5 |
* @package Booking Calendar |
| 6 |
* @since 11.4.4 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
if ( ! function_exists( 'wpbc_is_11_5_features_enabled' ) ) { |
| 14 |
/** |
| 15 |
* Report that the released Booking Calendar 11.5 feature set is enabled. |
| 16 |
* |
| 17 |
* Booking Calendar Pro 11.5 conditionally calls this function before |
| 18 |
* applying released pricing and booking-parameter filters. Free 11.6 keeps |
| 19 |
* this compatibility shim so those supported mixed-version installations |
| 20 |
* continue to execute the established Pro hooks. |
| 21 |
* |
| 22 |
* @deprecated 11.6.0 The 11.5 features are now always available. |
| 23 |
* |
| 24 |
* @return bool Always true. |
| 25 |
*/ |
| 26 |
function wpbc_is_11_5_features_enabled() { |
| 27 |
return true; |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* Check whether the unfinished Booking Calendar 11.6 feature set may load. |
| 33 |
* |
| 34 |
* The constant is a hard, non-filterable bootstrap boundary. Disabling it |
| 35 |
* removes 11.6 modules and menus while leaving released functionality loaded. |
| 36 |
* |
| 37 |
* @return bool True when the 11.6 feature modules may bootstrap. |
| 38 |
*/ |
| 39 |
function wpbc_is_11_6_features_enabled() { |
| 40 |
|
| 41 |
return defined( 'WPBC_ENABLE_11_6_FEATURES' ) && true === WPBC_ENABLE_11_6_FEATURES; |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Check whether the experimental template-driven catalog may load. |
| 46 |
* |
| 47 |
* This dedicated, non-filterable gate does not replace the 11.6 master gate. |
| 48 |
* Callers at bootstrap boundaries must require both gates so an explicitly |
| 49 |
* enabled catalog cannot bypass a disabled 11.6 feature set. |
| 50 |
* |
| 51 |
* @return bool True only when the catalog constant is the boolean true. |
| 52 |
*/ |
| 53 |
function wpbc_is_11_6_catalog_v2_enabled() { |
| 54 |
|
| 55 |
return defined( 'WPBC_ENABLE_11_6_CATALOG_V2' ) && true === WPBC_ENABLE_11_6_CATALOG_V2; |
| 56 |
} |
| 57 |
|