<?php
/**
 * Grand Reset Plugin
 * https://webenginecms.org/
 * 
 * @version 1.0.0
 * @author Lautaro Angelico <http://lautaroangelico.com/>
 * @copyright (c) 2013-2019 Lautaro Angelico, All Rights Reserved
 */

// namespace
namespace Plugin\GrandReset;

// plugin root
define('__PATH_GRANDRESET_ROOT__', __PATH_PLUGINS__.'grandreset/');

// plugin home url
define('__GRANDRESET_HOME__', __BASE_URL__.'usercp/grandreset/');

// admincp
$extra_admincp_sidebar[] = array(
    'Grand Reset', array(
        array('Settings','grandreset&page=settings'),
    )
);

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

// load classes
if(!@include_once(__PATH_GRANDRESET_ROOT__ . 'classes/class.grandreset.php')) throw new Exception(lang('grandreset_error_1'));