public function __construct()
 {
     global $wpdb;
     $this->wpdb =& $wpdb;
     $this->_users_table = $wpdb->prefix . $this->_users_table;
     $this->_dealers_affiliates_table = $wpdb->prefix . $this->_dealers_affiliates_table;
     $this->_manufacturers_table = $wpdb->prefix . $this->_manufacturers_table;
     $this->_models_table = $wpdb->prefix . $this->_models_table;
     $this->_body_types_table = $wpdb->prefix . $this->_body_types_table;
     $this->_transmissions_table = $wpdb->prefix . $this->_transmissions_table;
     $this->_equipments_table = $wpdb->prefix . $this->_equipments_table;
     $this->_doors_table = $wpdb->prefix . $this->_doors_table;
     $this->_fuels_table = $wpdb->prefix . $this->_fuels_table;
     $this->_technical_conditions_table = $wpdb->prefix . $this->_technical_conditions_table;
     $this->_currencies_table = $wpdb->prefix . $this->_currencies_table;
     $this->_transport_types_table = $wpdb->prefix . $this->_transport_types_table;
     $this->_regions_table = $wpdb->prefix . $this->_regions_table;
     $this->_cities_table = $wpdb->prefix . $this->_cities_table;
     $this->_region_types_table = $wpdb->prefix . $this->_region_types_table;
     $this->_states_table = $wpdb->prefix . $this->_states_table;
     $this->_drive_table = $wpdb->prefix . $this->_drive_table;
     $this->_colors_table = $wpdb->prefix . $this->_colors_table;
     $this->_photos_table = $wpdb->prefix . $this->_photos_table;
     $this->_recovery_password_table = $wpdb->prefix . $this->_recovery_password_table;
     $this->_transactions_table = $wpdb->prefix . $this->_transactions_table;
     $this->load = AT_Loader::get_instance();
     $this->core = AT_Core::get_instance();
     $this->registry = AT_Registry::get_instance();
 }
 public static function get_instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 private function _frontend_controller($params)
 {
     $controller = AT_Router::get_instance()->get_controller();
     $method_exec = '_' . AT_Router::get_instance()->get_controller() . '_data';
     $data = array_merge($this->_frontend_header($params), method_exists($this, $method_exec) ? $this->{$method_exec}(AT_Router::get_instance()->get_method(), $params) : $this->_default_data());
     AT_Registry::get_instance()->set('header_data', $data);
     return $data;
 }
 public function __construct()
 {
     $this->core = AT_Core::get_instance();
     // if ( !$this->core->get_option( 'theme_is_activated', false ) && is_user_logged_in() ) {
     // 	AT_Notices::set_frontend_notice(
     // 		'<h3>'.__( 'New to AutoDealer?' , AT_TEXTDOMAIN ) . '</h3>' .
     // 		__( 'You almost ready to use full theme features. Please complete two last steps before move your website to production mode.' , AT_TEXTDOMAIN ) .
     // 		'<br />' .
     // 		sprintf(__( '<a href="%1$s">Click here to continue &rarr;</a>' , AT_TEXTDOMAIN ), get_admin_url() . 'admin.php?page=at_site_options_general'),
     // 		$class = 'notice'
     // 	);
     // 	Header('Location: ' . get_admin_url() . 'admin.php?page=at_site_options_general');
     // 	die();
     // 	// exit( __( 'Theme is not activated' , AT_TEXTDOMAIN ) );
     // }
     // SSL and ajax tricks
     // if ( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] != rtrim( home_url(), '/' ) ) {
     // 	AT_Common::redirect( AT_Router::get_instance()->server('REQUEST_URI'), '301' );
     // }
     $this->uri = AT_Router::get_instance();
     if ($this->uri->get_method() != 'show_underconstruction' && $this->core->get_option('status_site', 'production') == 'underconstruction') {
         AT_Core::show_underconstruction();
     }
     $this->view = $this->core->view;
     $this->load = AT_Loader::get_instance();
     $this->session = AT_Session::get_instance();
     $this->registry = AT_Registry::get_instance();
     $this->load->library('breadcrumbs');
     $this->breadcrumbs = AT_Breadcrumbs::get_instance();
     $validation_rules = $this->load->helper('validation_rules', true);
     $this->validation = $this->load->library('form_validation', true, $validation_rules->rules);
     //$this->validation->set_rules();
     if (AT_Common::is_user_logged() && $this->core->get_option('theme_is_activated', false)) {
         $user_model = $this->load->model('user_model');
         $user_info = $user_model->get_user_by_id(AT_Common::get_logged_user_id());
         $this->registry->set('user_info', $user_info);
         if ($this->core->get_option('confirm_email_enable', true) && !in_array($this->uri->segments(1), array('confirm_email', 'unlogged')) && (is_null($user_info['date_active']) || empty($user_info['date_active']))) {
             AT_Common::redirect('auth/confirm_email');
         }
     }
 }
 public function __construct()
 {
     $this->registry = AT_Registry::get_instance();
 }
<!DOCTYPE html>
<!--[if !IE]><!--> <html <?php 
language_attributes();
?>
> <!--<![endif]-->
<head>
  <meta charset="<?php 
bloginfo('charset');
?>
" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <?php 
if (defined("AT_DIR")) {
    $header_data = AT_Registry::get_instance()->get('header_data');
    $page_title = $header_data['page_title'];
} else {
    $page_title = '';
    if (!isset($content_width)) {
        $content_width = 900;
    }
}
?>
  <title><?php 
echo $page_title;
?>
</title>
  <link rel="profile" href="http://gmpg.org/xfn/11" />
  <link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />