/**
  * The purpose of this method is to sideload the lang file for the given WPLANG locale (if necessary).
  *
  * @access private
  * @static
  * @return void
  */
 private static function _maybe_get_langfile()
 {
     self::$_lang = get_locale();
     if ($has_check = get_option('ee_lang_check_' . self::$_lang . '_' . EVENT_ESPRESSO_VERSION) || empty(self::$_lang)) {
         return;
     }
     //if lang is en_US or empty then lets just get out.  (Event Espresso core is en_US)
     if (empty(self::$_lang) || self::$_lang == 'en_US') {
         return;
     }
     //made it here so let's get the file from the github repo
     $sideloader_args = array('_upload_to' => EE_PLUGIN_DIR_PATH . 'languages/', '_upload_from' => 'https://github.com/eventespresso/languages-ee4/blob/master/event_espresso-' . self::$_lang . '.mo?raw=true', '_new_file_name' => 'event_espresso-' . self::$_lang . '.mo');
     $sideloader = EE_Registry::instance()->load_helper('Sideloader', $sideloader_args, FALSE);
     $sideloader->sideload();
     update_option('ee_lang_check_' . self::$_lang . '_' . EVENT_ESPRESSO_VERSION, 1);
 }
 /**
  * load_core_configuration
  *
  * this is hooked into 'AHEE__EE_Bootstrap__load_core_configuration'
  * which runs during the WP 'plugins_loaded' action at priority 5
  *
  * @return void
  */
 public function load_core_configuration()
 {
     do_action('AHEE__EE_System__load_core_configuration__begin', $this);
     $this->registry->load_core('EE_Load_Textdomain');
     //load textdomain
     EE_Load_Textdomain::load_textdomain();
     // load and setup EE_Config and EE_Network_Config
     $this->registry->load_core('Config');
     $this->registry->load_core('Network_Config');
     // setup autoloaders
     // enable logging?
     if ($this->registry->CFG->admin->use_full_logging) {
         $this->registry->load_core('Log');
     }
     // check for activation errors
     $activation_errors = get_option('ee_plugin_activation_errors', FALSE);
     if ($activation_errors) {
         EE_Error::add_error($activation_errors, __FILE__, __FUNCTION__, __LINE__);
         update_option('ee_plugin_activation_errors', FALSE);
     }
     // get model names
     $this->_parse_model_names();
     //load caf stuff a chance to play during the activation process too.
     $this->_maybe_brew_regular();
     do_action('AHEE__EE_System__load_core_configuration__complete', $this);
 }