* @copyright 2016 SmatDataSoft * @license private * @version 5.1.3 * International Registered Trademark & Property of SmatDataSoft */ class UniteWpmlRev { public static function isWpmlExists() { return true; if (class_exists("SitePress")) { return(true); } else { return(false); } } private static function validateWpmlExists() { if (!self::isWpmlExists()) { UniteFunctionsRev::throwError("The wpml plugin don't exists"); } } public static function getArrLanguages($getAllCode = true) { $arrLangs = Language::getLanguages(); $response = array(); if ($getAllCode == true) { $response["all"] = __("All Languages", REVSLIDER_TEXTDOMAIN); } foreach ($arrLangs as $code => $arrLang) { $ind = $arrLang['iso_code']; $response[$ind] = $arrLang['name']; } return($response); } public static function getArrLangCodes($getAllCode = true) { $arrCodes = array(); if ($getAllCode == true) { $arrCodes["all"] = "all"; } $arrLangs = Language::getLanguages(); foreach ($arrLangs as $code => $arr) { $ind = $arr['iso_code']; $arrCodes[$ind] = $ind; } return($arrCodes); } public static function isAllLangsInArray($arrCodes) { $arrAllCodes = self::getArrLangCodes(); $diff = array_diff($arrAllCodes, $arrCodes); return(empty($diff)); } public static function getLangsWithFlagsHtmlList($props = "", $htmlBefore = "") { $arrLangs = self::getArrLanguages(); if (!empty($props)) { $props = " " . $props; } $html = "