<?php

/*
 * Copyright (c) 2012-2022, Squirrly.
 * The copyrights to the software code in this file are licensed under the (revised) BSD open source license.

 * Plugin Name: Next Level Marketing
 * Plugin URI: https://wordpress.org/plugins/squirrly-seo/
 * Description: Next Level Marketing
 * Author: Squirrly
 * Author URI: https://plugin.squirrly.co
 * Version: 1.1.0
 * License: GPLv2 or later
 * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Text Domain: Next-Level-Marketing
 * Domain Path: /languages
 */

    //*****Main */
    if (!defined('NEXT_LVL')) {}
    /* SET THE CURRENT VERSION ABOVE AND BELOW */
    define('NEXT_LVL', '1.1.0');

    // Call config files
    try {
            include_once dirname(__FILE__) . '/config/config.php';
            include_once dirname(__FILE__) . '/debug/index.php';
       
        
            /* important to check the PHP version */
            // inport main classes
            include_once _NXTLVL_CLASSES_DIR_ . 'ObjController.php';

            
            require_once(plugin_dir_path(__FILE__) . '/pub/pubchecker.php');
            bootstrap();
          

            // Load helpers
            NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_Helpers_Tools');
            NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_Helpers_Sanitize');
            // Load the Front and Block controller
            NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_FrontController');
            
           
            require_once(plugin_dir_path(__FILE__) . '/update.php');

            if (NXTLVL_Classes_Helpers_Tools::isBackedAdmin()) {
                NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_FrontController')->runAdmin();

                //Upgrade Squirrly call.
                register_activation_hook(__FILE__, array(NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_Helpers_Tools'), 'strb_activate'));
                register_deactivation_hook(__FILE__, array(NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_Helpers_Tools'), 'nxt_deactivate'));
                    
            } else {
                NXTLVL_Classes_ObjController::getClass('NXTLVL_Classes_FrontController')->runFrontend(); 
            }
                

        } catch (Exception $e) {
        };
    
       