Skip to content

Commit

Permalink
added support for runtimeInfos.currentLanguage if wpml is active
Browse files Browse the repository at this point in the history
  • Loading branch information
setola committed Feb 1, 2013
1 parent 560eda6 commit 9f9877d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions RuntimeInfos.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ public function set_standard_infos(){
->add_info('theme_url', get_template_directory_uri())
->add_info('upload_dir', $uploadDir)
->add_info('home_url', get_bloginfo('url'))
->add_info('ajaxurl', admin_url('admin-ajax.php'))
->generate_unique_id();
->add_info('ajaxurl', admin_url('admin-ajax.php'));

if(defined('ICL_LANGUAGE_CODE')){
$this->add_info('currentLanguage', substr(ICL_LANGUAGE_CODE, 0, 2));
}

$this->generate_unique_id();

set_transient($this->id, $this->infos);
if($this->type == self::TYPE_AJAX){
Expand Down

0 comments on commit 9f9877d

Please sign in to comment.