mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Fix fatal error - check if wpml is active
This commit is contained in:
@@ -269,6 +269,11 @@ 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
|
||||
);
|
||||
|
||||
$current_code = ! empty( $current_code ) ? $current_code : $sitepress->get_current_language();
|
||||
|
||||
$default = $sitepress->get_locale_from_language_code( $sitepress->get_default_language() );
|
||||
|
||||
Reference in New Issue
Block a user