<?php
/*
 *	CloudFw WPML
 *
 *	@since 1.0
**/
add_action( 'admin_init', 'cloudfw_wpml_comp', 0);
function cloudfw_wpml_comp() {
	if( defined( 'DOING_AJAX' ) ) {
		add_filter('icl_set_current_language', 'cloudfw_return_current_lang', 10);
		add_filter('icl_current_language', 'cloudfw_return_current_lang', 10);
	}
}

function cloudfw_return_current_lang($default_lang){

	if (isset($_GET['lang']))
		return isset($_GET['lang']);
	else
		return $default_lang;
}

icl_register_string('cloudfw_fix', 'footer_text', $_opt[PFIX.'_footer']['bottom_text']);