PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.6.4
VikBooking Hotel Booking Engine & PMS v1.6.4
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
vikbooking / defines.php

defines.php in VikBooking Hotel Booking Engine & PMS 1.6.4, at defines.php

99 lines 4.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package VikBooking
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2018 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 // Software version
15 define('VIKBOOKING_SOFTWARE_VERSION', '1.6.4');
16
17 // Base path
18 define('VIKBOOKING_BASE', dirname(__FILE__));
19
20 // Libraries path
21 define('VIKBOOKING_LIBRARIES', VIKBOOKING_BASE . DIRECTORY_SEPARATOR . 'libraries');
22
23 // Languages path
24 defined('VIKBOOKING_LANG') or define('VIKBOOKING_LANG', basename(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'languages');
25 /**
26 * The admin and site languages are no more used by the plugin.
27 *
28 * @deprecated 1.0.2
29 * @see these constants won't be removed as some classes of VCM may need them.
30 */
31 defined('VIKBOOKING_SITE_LANG') or define('VIKBOOKING_SITE_LANG', basename(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'site' . DIRECTORY_SEPARATOR . 'language');
32 defined('VIKBOOKING_ADMIN_LANG') or define('VIKBOOKING_ADMIN_LANG', basename(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'language');
33
34 // Assets URI
35 define('VIKBOOKING_SITE_ASSETS_URI', plugin_dir_url(__FILE__) . 'site/resources/');
36 define('VIKBOOKING_ADMIN_ASSETS_URI', plugin_dir_url(__FILE__) . 'admin/resources/');
37
38 // Debug flag
39 define('VIKBOOKING_DEBUG', false);
40
41 // URI Constants for admin and site sections (with trailing slash)
42 defined('VBO_ADMIN_URI') or define('VBO_ADMIN_URI', plugin_dir_url(__FILE__).'admin/');
43 defined('VBO_SITE_URI') or define('VBO_SITE_URI', plugin_dir_url(__FILE__).'site/');
44 defined('VBO_BASE_URI') or define('VBO_BASE_URI', plugin_dir_url(__FILE__));
45 defined('VBO_MODULES_URI') or define('VBO_MODULES_URI', plugin_dir_url(__FILE__));
46 defined('VBO_ADMIN_URI_REL') or define('VBO_ADMIN_URI_REL', plugin_dir_url(__FILE__).'admin/');
47 defined('VBO_SITE_URI_REL') or define('VBO_SITE_URI_REL', plugin_dir_url(__FILE__).'site/');
48 defined('VCM_ADMIN_URI') or define('VCM_ADMIN_URI', str_replace('vikbooking/admin', 'vikchannelmanager/admin', VBO_ADMIN_URI));
49 defined('VCM_SITE_URI') or define('VCM_SITE_URI', str_replace('vikbooking/site', 'vikchannelmanager/site', VBO_SITE_URI));
50
51 // Path Constants for admin and site sections (with NO trailing directory separator)
52 defined('VBO_ADMIN_PATH') or define('VBO_ADMIN_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'admin');
53 defined('VBO_SITE_PATH') or define('VBO_SITE_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'site');
54 defined('VCM_ADMIN_PATH') or define('VCM_ADMIN_PATH', str_replace('vikbooking' . DIRECTORY_SEPARATOR . 'admin', 'vikchannelmanager' . DIRECTORY_SEPARATOR . 'admin', VBO_ADMIN_PATH));
55 defined('VCM_SITE_PATH') or define('VCM_SITE_PATH', str_replace('vikbooking' . DIRECTORY_SEPARATOR . 'site', 'vikchannelmanager' . DIRECTORY_SEPARATOR . 'site', VBO_SITE_PATH));
56
57 // Other Constants that may not be available in the framework
58 defined('DS') or define('DS', DIRECTORY_SEPARATOR);
59
60 /**
61 * We define the base path constant for the upload dir
62 * used to upload the customer documents onto the sub-dirs.
63 *
64 * @since 1.3.0
65 */
66 $customer_upload_base_path = VBO_ADMIN_PATH . DIRECTORY_SEPARATOR . 'resources';
67 $customer_upload_base_uri = VBO_ADMIN_URI . 'resources/';
68 $media_upload_base_path = $customer_upload_base_path;
69 $media_upload_base_uri = $customer_upload_base_uri;
70 $upload_dir = wp_upload_dir();
71 if (is_array($upload_dir) && !empty($upload_dir['basedir']) && !empty($upload_dir['baseurl'])) {
72 $customer_upload_base_path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'vikbooking' . DIRECTORY_SEPARATOR . 'customerdocs';
73 $customer_upload_base_uri = rtrim($upload_dir['baseurl'], '/') . '/' . 'vikbooking' . '/' . 'customerdocs' . '/';
74 // define proper values for the media directory
75 $media_upload_base_path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'vikbooking' . DIRECTORY_SEPARATOR . 'media';
76 $media_upload_base_uri = rtrim($upload_dir['baseurl'], '/') . '/' . 'vikbooking' . '/' . 'media' . '/';
77 }
78 defined('VBO_CUSTOMERS_PATH') or define('VBO_CUSTOMERS_PATH', $customer_upload_base_path);
79 defined('VBO_CUSTOMERS_URI') or define('VBO_CUSTOMERS_URI', $customer_upload_base_uri);
80
81 /**
82 * We define the base path and URI for the media dir.
83 *
84 * @since 1.5.0
85 */
86 defined('VBO_MEDIA_PATH') or define('VBO_MEDIA_PATH', $media_upload_base_path);
87 defined('VBO_MEDIA_URI') or define('VBO_MEDIA_URI', $media_upload_base_uri);
88
89 /**
90 * Site pre-process flag.
91 * When this flag is enabled, the plugin will try to dispatch the
92 * site controller within the "init" action. This is made by
93 * fetching the shortcode assigned to the current URI.
94 *
95 * By disabling this flag, the site controller will be dispatched
96 * with the headers already sent.
97 */
98 define('VIKBOOKING_SITE_PREPROCESS', true);
99