Fix WPML fatal error issue

This commit is contained in:
Champ Camba
2017-01-23 21:21:13 +08:00
parent 754368505e
commit 4f61d7288c
+1 -1
View File
@@ -36,7 +36,7 @@ class UM_Logout {
$has_translation = true;
if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') ){ // checks if WPML exists
if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') && isset( $sitepress ) ){ // checks if WPML exists
$trid = $sitepress->get_element_trid( $current_page_ID );
}