<?php
spl_autoload_register(function ($classname) {
  $class = str_replace('\\', DIRECTORY_SEPARATOR, str_replace('_', '-', strtolower($classname)));
  $classes = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . $class . '.php';

  if (file_exists($classes)) {
    require_once ($classes);
  }
});

$theme = new kavehTheme();
$assets = new kavehAssets();
$requres = new kavehRequires();
$kdemos = new kavehDemos();
$kwoo = new kavehWoo();
$kelementor = new kavehElementor();
$kwidgets = new kavehWidgets();
$slidecart = new slideCart();
$kdynamicCss = new kavehdyanmicCss();
$kavehAjaxHandler = new kavehajaxHandler();
$kAjaxes = new kavehAjaxes();
$kavehfragments = new kavehFragments();
$kloginpagehandler = new kavehpageHandler();
$kajaxrequires = new kavehajaxLogin();
$kavehrestrules = new kavehrestrules();
$kavehsms = new kavehsms();
$kavehwoosingle = new kavehwoosingle();
$kavehproptions = new kavehproptions();
kavehRequires::initkaveh_frame();

if (is_admin()) {
  $licenseChecker = new kavehRTLlicense('RTL_License_922382b0e1afe197');
  if ($licenseChecker->isActive()) {
    $theme_options = new kavehOptions('kaveh_frame');
  } elseif (kavehTheme::isLocalEnvironment()) {
    if (is_admin()) {
      $theme_options = new kavehOptions('kaveh_frame');
    }
  } else {
    // Product is not active
  }
}