Fix wpml existence validation

This commit is contained in:
Champ Camba
2019-11-15 21:58:32 +08:00
parent b6138eb665
commit 856cb8492a
@@ -269,10 +269,8 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
function get_languages_codes( $current_code = false ) {
global $sitepress;
if( ! function_exists('wpml_object_id ') ) return array(
'default' => '',
'current' => $current
);
if ( ! $this->is_wpml_active() )
return $current_code;
$current_code = ! empty( $current_code ) ? $current_code : $sitepress->get_current_language();