<?php
/**
 * Change Class
 * https://webenginecms.org/
 * 
 * @version 1.0.0
 * @author Lautaro Angelico <http://lautaroangelico.com/>
 * @copyright (c) 2013-2020 Lautaro Angelico, All Rights Reserved
 * @build w641ba01901cb0925ec50f543e59acbd
 */

// namespace
namespace Plugin\ChangeClass;

// plugin root
define('__PATH_CHANGECLASS_ROOT__', __PATH_PLUGINS__.'changeclass/');

// plugin home url
define('__CHANGECLASS_HOME__', __BASE_URL__.'usercp/changeclass/');

// admincp
$extra_admincp_sidebar[] = array(
    'Change Class', array(
        array('Settings','changeclass&page=settings'),
    )
);

// language phrases
if(file_exists(__PATH_CHANGECLASS_ROOT__ . 'languages/'.config('language_default', true).'/language.php')) {
	// attempt to load same language as website
	if(!@include_once(__PATH_CHANGECLASS_ROOT__ . 'languages/'.config('language_default', true).'/language.php')) throw new Exception('Error loading language file (changeclass).');
} else {
	// load default language file (en)
	if(!@include_once(__PATH_CHANGECLASS_ROOT__ . 'languages/en/language.php')) throw new Exception('Error loading language file (changeclass).');
}

// load classes
if(!@include_once(__PATH_CHANGECLASS_ROOT__ . 'classes/class.changeclass.php')) throw new Exception(lang('changeclass_error_1'));