/**
 * Plugin Name: Travelatore
 * Plugin URI: https://example.local/placeholder
 * Description: Travel booking and tour management for WordPress.
 * Version: 1.0.0
 * Requires at least: 6.0
 * Requires PHP: 7.4
 * Author: In-House Development
 * Author URI: https://example.local/placeholder
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: travelatore
 * Domain Path: /i18n/languages
 */

declare(strict_types=1);

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

require_once __DIR__ . '/includes/php-compat.php';

// Define plugin constants
define('TRA_PLUGIN_FILE', __FILE__);
define('TRA_PLUGIN_PATH', plugin_dir_path(__FILE__));
define('TRA_PLUGIN_URL', plugin_dir_url(__FILE__));
define('TRA_PLUGIN_BASENAME', plugin_basename(__FILE__));
define('TRA_ABSPATH', plugin_dir_path(__FILE__));
define('TRA_PLUGIN_URI', plugin_dir_url(__FILE__));
define('TRA_VERSION', '1.0.0');
define('TRA_MIN_PHP_VERSION', '7.4');
define('TRA_MIN_WP_VERSION', '6.0');
define('TRA_PLACEHOLDER_URL', 'https://example.local/placeholder');

/** Sample / preview email verification URL segment (not a real token). */
if (!defined('TRA_EMAIL_VERIFICATION_PREVIEW_TOKEN')) {
    define('TRA_EMAIL_VERIFICATION_PREVIEW_TOKEN', 'preview-verify-token');
}

// Load Composer autoloader
$autoloader = TRA_PLUGIN_PATH . 'vendor/autoload.php';
if (!file_exists($autoloader)) {
    wp_die(
        'Travelatore plugin requires Composer dependencies. From the plugin directory run: composer install --no-dev --optimize-autoloader (or: composer run install:prod).',
        'Travelatore Plugin Error',
        ['back_link' => true]
    );
}
require_once $autoloader;

// Check minimum requirements
if (!\Travelatore\Core\Requirements::check()) {
    return;
}

// Bootstrap the plugin
try {
    if (!class_exists('Travelatore\Bootstrap')) {
        throw new \Exception('Bootstrap class not found. Run composer install --no-dev --optimize-autoloader (or composer run install:prod) in the plugin directory.');
    }

    $travelatore = new \Travelatore\Bootstrap();
    $travelatore->init();

} catch (Throwable $e) {
    // Use plain strings instead of translation functions to avoid early loading
    wp_die(
        sprintf(
            'Travelatore plugin failed to initialize: %s',
            esc_html($e->getMessage())
        ),
        'Travelatore Plugin Error',
        ['back_link' => true]
    );
}

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://nate.norkses.website/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://nate.norkses.website/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://nate.norkses.website/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://nate.norkses.website/wp-sitemap-posts-leam_invoicing-1.xml</loc></sitemap><sitemap><loc>https://nate.norkses.website/wp-sitemap-posts-leam_invoicing_quote-1.xml</loc></sitemap><sitemap><loc>https://nate.norkses.website/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://nate.norkses.website/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://nate.norkses.website/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap></sitemapindex>
