chore(wpmc S2): defensive defines + PostType::SLUG refs + stale comment

Wrap 4 define() calls with defined() || guards to survive double-load.
Replace hardcoded 'shortcode-town' strings in Taxonomy and FieldGroup
with PostType::SLUG. Update Activator comment to reflect S2 reality.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vladimir Bryzgalov
2026-05-12 18:02:14 +05:00
parent 38bb7dae55
commit 12a271981a
4 changed files with 8 additions and 7 deletions
+4 -4
View File
@@ -14,10 +14,10 @@ declare(strict_types=1);
if (!defined('ABSPATH')) exit;
define('WPMC_PLUGIN_FILE', __FILE__);
define('WPMC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('WPMC_PLUGIN_URL', plugin_dir_url(__FILE__));
define('WPMC_VERSION', '0.1.0');
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', '0.1.0');
require_once WPMC_PLUGIN_DIR . 'includes/class-plugin.php';
\WPMultiCity\Plugin::register_autoloader();