<?php
/**
 * Plugin Name: ParcelPanel Plus 🎨
 * Description: ParcelPanel 增强版扩展
 * Version: 1.0.2
 * Author: Shine
 * Text Domain: parcelpanel-cmd-plus
 */

// Exit if accessed directly.
if (!defined('ABSPATH')) {
    exit;
}

// if($_SERVER['HTTP_HOST'] === 'blog.parcelpanel.com'){
//     // 2024-05-09 新增
//     define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
// }

require_once __DIR__ . "/vendor/autoload.php";

if (!function_exists('parcelpanel_cms_plus')) {
    function parcelpanel_cms_plus(): \ParcelPanel\CmsPlus\ParcelPanelCmsPlus
    {
        return \ParcelPanel\CmsPlus\ParcelPanelCmsPlus::instance();
    }
}


add_filter( 'wpseo_sitemap_exclude_author', fn () => true );
add_filter( 'wpseo_sitemap_exclude_taxonomy', fn ($excluded) => $excluded, 10, 2 );


if (!defined('PARCELPANEL_CMS_PLUS_ROUTE_NAMESPACE')) {
    define("PARCELPANEL_CMS_PLUS_ROUTE_NAMESPACE", 'parcelpanel-cms-plus/v1');
}

parcelpanel_cms_plus();
