| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* EmbedPress Core Initialization |
| 5 |
* |
| 6 |
* This file initializes core EmbedPress functionality including the asset manager |
| 7 |
*/ |
| 8 |
|
| 9 |
use EmbedPress\Core\AssetManager; |
| 10 |
use EmbedPress\Core\LocalizationManager; |
| 11 |
|
| 12 |
// Prevent direct access |
| 13 |
if (!defined('ABSPATH')) { |
| 14 |
exit; |
| 15 |
} |
| 16 |
|
| 17 |
// Include the AssetManager and LocalizationManager classes |
| 18 |
require_once EMBEDPRESS_PLUGIN_DIR_PATH . 'Core/AssetManager.php'; |
| 19 |
require_once EMBEDPRESS_PLUGIN_DIR_PATH . 'Core/LocalizationManager.php'; |
| 20 |
|
| 21 |
// Include Analytics class |
| 22 |
require_once EMBEDPRESS_PATH_BASE . 'EmbedPress/Analytics/Analytics.php'; |
| 23 |
|
| 24 |
// Initialize AssetManager and LocalizationManager when WordPress is ready |
| 25 |
add_action('init', function() { |
| 26 |
AssetManager::init(); |
| 27 |
LocalizationManager::init(); |
| 28 |
}, 5); // Early priority to ensure it's loaded before other components |
| 29 |
|