<?php
/**
 * Plug additional sidebars into Admin.
 *
 * @package  Sparta
 * @since    1.0
 */
class Sparta_Megamenu {
    /**
     * Variable to hold the initialization state.
     *
     * @var  boolean
     */
    protected static $initialized = false;
    
    /**
     * Initialize functions.
     *
     * @return  void
     */
    public static function initialize() {
        if (self::$initialized) {
            return;
        }
        
        // Load Mega Menu
	    self::load_megamenu();
        
        // State that initialization completed.
        self::$initialized = true;
    }
	
	/**
	 * Load megamenu libs.
	 *
	 * @return void
	 */
	public static function load_megamenu() {

		$filename = Sparta_Core::get_libs_path() . 'uni-mega-menu/uni-mega-menu.php';
		if( file_exists( $filename ) ) {
			include_once $filename;
		}
	}
 
}