<?php
/*
  Copyright (c) 2023, Squirrly.
  The copyrights to the software code in this file are licensed under the (revised) BSD open source license.

  Plugin Name: Website Analysis Ultimate Plugin by SQUIRRLY™
  Plugin URI: https://wordpress.org/plugins/posts-analysis/
  Author: Nagy Paul Sorel, Calin Vingan
  Description: Website Analysis Ultimate Plugin is The Easiest Way For WordPress Marketers to Get the Pulse of their Latest Blog Posts
  Version: 2.0.5
  Author URI: http://www.squirrly.co
 * Requires at least: 4.6
 * Tested up to: 6.3
 * Requires PHP: 7.0
 */

if (defined('CTLPP_VERSION')) {
    define('CTLPP_BOTH_ACTIVE', true);
    return;
}

define('CTLPPU_VERSION', '2.0.5');

/* Call config files */
require(dirname(__FILE__) . '/config/config.php');
require(dirname(__FILE__) . '/config/globals.php');

/* inport main classes */
require_once(_CTLPPU_CLASSES_DIR_ . 'ObjController.php');
CTLPPU_Classes_ObjController::getClass('CTLPPU_Classes_FrontController');

if (is_admin() || is_network_admin()) {
    /* Main class call for admin */
    add_action('init', array(CTLPPU_Classes_ObjController::getClass('CTLPPU_Classes_FrontController'), 'runAdmin'));

    register_activation_hook(__FILE__, array(CTLPPU_Classes_ObjController::getClass('CTLPPU_Classes_Tools'), 'ctlppu_activate'));

    //Request the plugin update when a new version is released
    require dirname(__FILE__) . '/update.php';

}
