PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
← All changes | includes/_functions/versions.php +12 -20 11.8.1 → 11.9 View file →
@@ -17,28 +17,20 @@
17 17 // =====================================================================================================================
18 18 // == Versions ==
19 19 // =====================================================================================================================
20 20
21 -/**
22 - * Check if this demo website
23 - *
24 - * @return bool
25 - */
26 -function wpbc_is_this_demo() {
27 -
28 -// return true; //.
29 -
30 - if ( ! class_exists( 'wpdev_bk_personal' ) ) {
31 - return false; // If this is Booking Calendar Free version, then it's not the demo.
32 - }
33 -
34 - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
35 - if ( ( ( isset( $_SERVER['SCRIPT_FILENAME'] ) ) && ( strpos( $_SERVER['SCRIPT_FILENAME'], 'wpbookingcalendar.com' ) !== false ) ) || ( ( isset( $_SERVER['HTTP_HOST'] ) ) && ( strpos( $_SERVER['HTTP_HOST'], 'wpbookingcalendar.com' ) !== false ) ) ) {
36 - return true;
37 - } else {
38 - return false;
39 - }
40 -}
21 +/**
22 + * Check whether the site is a managed public Booking Calendar live demo.
23 + *
24 + * This compatibility helper delegates to the shared environment policy so
25 + * legacy consumers and newer capability checks cannot classify the same host
26 + * differently.
27 + *
28 + * @return bool True for a managed public live demo.
29 + */
30 +function wpbc_is_this_demo() {
31 + return WPBC_Environment_Policy::is_live_demo();
32 +}
41 33
42 34
43 35 /**
44 36 * Determine whether the current request uses the local beta hostname.