Fix WPML compatibility issue

This commit is contained in:
Champ Camba
2017-01-19 12:01:23 +08:00
parent ae48108d56
commit fdf3cc0e79
+2 -2
View File
@@ -30,13 +30,13 @@ class UM_Logout {
if( function_exists('icl_get_current_language') ){
$language_code = icl_get_current_language();
}else if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') ){
}else if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') ){ // checks if WPML exists
$language_code = ICL_LANGUAGE_CODE;
}
$has_translation = true;
if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') ){
if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') ){ // checks if WPML exists
$trid = $sitepress->get_element_trid( $current_page_ID );
}