33 lines
1.2 KiB
PHP
33 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: WP Multi City
|
|
* Description: Мультигородская подсистема: taxonomy town, шорткоды для подстановки по городу, роутер /{city}/{path}/, page-clones по городам.
|
|
* Version: 1.1.0
|
|
* Author: Vladimir Bryzgalov
|
|
* Requires PHP: 8.0
|
|
* Requires at least: 6.0
|
|
* Tested up to: 6.9
|
|
* License: GPLv2 or later
|
|
* Text Domain: wp-multi-city
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
if (!defined('ABSPATH')) exit;
|
|
|
|
defined('WPMC_PLUGIN_FILE') || define('WPMC_PLUGIN_FILE', __FILE__);
|
|
defined('WPMC_PLUGIN_DIR') || define('WPMC_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
|
defined('WPMC_PLUGIN_URL') || define('WPMC_PLUGIN_URL', plugin_dir_url(__FILE__));
|
|
defined('WPMC_VERSION') || define('WPMC_VERSION', '1.1.0');
|
|
|
|
require_once WPMC_PLUGIN_DIR . 'includes/class-plugin.php';
|
|
\WPMultiCity\Plugin::register_autoloader();
|
|
require_once WPMC_PLUGIN_DIR . 'includes/wpmc-functions.php';
|
|
|
|
register_activation_hook(__FILE__, ['\\WPMultiCity\\Activator', 'activate']);
|
|
register_deactivation_hook(__FILE__, ['\\WPMultiCity\\Activator', 'deactivate']);
|
|
|
|
add_action('plugins_loaded', static function (): void {
|
|
\WPMultiCity\Plugin::instance()->boot();
|
|
});
|