Repository navigation
Expand file tree
/
Copy pathtour-operator.php
More file actions
91 lines (76 loc) · 3.17 KB
/
Copy pathtour-operator.php
File metadata and controls
91 lines (76 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* Plugin Name: Tour Operator
* Plugin URI: https://touroperator.solutions/
* Description: Showcase tours, destinations, and accommodations with digital itineraries, galleries, and integrated maps.
* Author: lightspeedwp
* Author URI: https://lightspeedwp.agency/
* Version: 2.2.0
* Requires at least: 6.7
* Tested up to: 7.1
* Requires PHP: 8.2
* License: GPLv3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: tour-operator
* Domain Path: /languages/
* Tags: lsx, tour operator, travel, tourism, itinerary
*
* @package tour-operator
*/
// If this file is called directly, abort.
if (! defined('WPINC')) {
die;
}
define('LSX_TO_PATH', plugin_dir_path(__FILE__));
define('LSX_TO_CORE', __FILE__);
define('LSX_TO_URL', plugin_dir_url(__FILE__));
define('LSX_TO_VER', '2.2.0');
// Sentry error monitoring. Uses the site's Sentry client when there is one; otherwise
// starts its own only on local sites with the Composer dev dependencies and a DSN.
require_once LSX_TO_PATH . 'includes/sentry.php';
// Maintain a list of content model JSON paths consumed by the plugin.
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
global $CONTENT_MODEL_JSON_PATH;
$CONTENT_MODEL_JSON_PATH[] = LSX_TO_PATH;
// phpcs:enable WordPress.WP.GlobalVariablesOverride.Prohibited
// Post Expirator.
define('LSX_TO_POSTEXPIRATOR_DATEFORMAT', esc_html__('l F jS, Y', 'tour-operator'));
define('LSX_TO_POSTEXPIRATOR_TIMEFORMAT', esc_html__('g:ia', 'tour-operator'));
// Define asset debug mode based on SCRIPT_DEBUG constant.
if (! defined('DEBUG_SCRIPTS')) {
define('LSX_TO_ASSET_DEBUG', '.min');
} else {
define('LSX_TO_ASSET_DEBUG', '');
}
// phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
// Plugin dependencies.
require_once LSX_TO_PATH . 'plugins/content-models/create-content-model.php';
require_once LSX_TO_PATH . 'plugins/cmb2/init.php';
require_once LSX_TO_PATH . 'plugins/cmb2-field-map/cmb-field-map.php';
require_once LSX_TO_PATH . 'plugins/cmb-field-select2/cmb-field-select2.php';
// phpcs:enable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
// Template Tags.
require_once LSX_TO_PATH . 'includes/template-tags/general.php';
require_once LSX_TO_PATH . 'includes/template-tags/helpers.php';
require_once LSX_TO_PATH . 'includes/template-tags/maps.php';
// Include context helper & autoloader.
require_once LSX_TO_PATH . 'includes/tour-operator.php';
// Include functions.
require_once LSX_TO_PATH . 'includes/functions.php';
// Register tour operator autoloader.
spl_autoload_register('tour_operator_autoload_class', true, false);
// Init legacy.
\lsx\legacy\Tour_Operator::get_instance();
// Init Plugin.
tour_operator();
// Relationship meta maintenance command.
if (defined('WP_CLI') && WP_CLI) {
\WP_CLI::add_command(
'tour-operator normalise-relationships',
array(new \lsx\legacy\Relationship_CLI(), 'normalise_relationships')
);
}
/**
* Include sticky menu block filters. This adds mobile section headers to group blocks.
*/
require_once LSX_TO_PATH . 'build/blocks/sticky-menu/filters.php';