get_default_language(); $multilang['current'] = $sitepress->get_current_language(); $multilang['languages'] = $sitepress->get_active_languages(); } else if ( amy_is_polylang_activated() ) { global $polylang; $current = pll_current_language(); $default = pll_default_language(); $current = (empty( $current )) ? $default : $current; $poly_langs = $polylang->model->get_languages_list(); $languages = array(); foreach ( $poly_langs as $p_lang ) { $languages[ $p_lang->slug ] = $p_lang->slug; } $multilang['default'] = $default; $multilang['current'] = $current; $multilang['languages'] = $languages; } else if ( amy_is_qtranslate_activated() ) { global $q_config; $multilang['default'] = $q_config['default_language']; $multilang['current'] = $q_config['language']; $multilang['languages'] = array_flip( qtrans_getSortedLanguages() ); } } $multilang = apply_filters( 'amy_language_defaults', $multilang ); return ( ! empty( $multilang )) ? $multilang : false; } } /** * Visual Composer plugin is activated */ if ( ! function_exists( 'is_vc_activated' ) ) { function is_vc_activated() { if ( class_exists( 'Vc_Manager' ) && defined( 'WPB_VC_VERSION' ) && version_compare( WPB_VC_VERSION, '4.2.3', '>=' ) ) { return true; } else { return false; } } } /** * Get locate for load textdomain */ if ( ! function_exists( 'amy_get_locale' ) ) { function amy_get_locale() { global $locale, $wp_local_package; if ( isset( $locale ) ) { return apply_filters( 'locale', $locale ); } if ( isset( $wp_local_package ) ) { $locale = $wp_local_package; } if ( defined( 'WPLANG' ) ) { $locale = WPLANG; } if ( is_multisite() ) { if ( defined( 'WP_INSTALLING' ) || (false === $ms_locale = get_option( 'WPLANG' )) ) { $ms_locale = get_site_option( 'WPLANG' ); } if ( $ms_locale !== false ) { $locale = $ms_locale; } } else { $db_locale = get_option( 'WPLANG' ); if ( $db_locale !== false ) { $locale = $db_locale; } } if ( empty( $locale ) ) { $locale = 'en_US'; } return apply_filters( 'locale', $locale ); } } /** * Get google fonts. */ if ( ! function_exists( 'amy_get_google_fonts' ) && ! defined( 'AMY_VERSION' ) ) { function amy_get_google_fonts() { return array(); } }