本文整理匯總了PHP中RevSliderWpml::isAllLangsInArray方法的典型用法代碼示例。如果您正苦於以下問題:PHP RevSliderWpml::isAllLangsInArray方法的具體用法?PHP RevSliderWpml::isAllLangsInArray怎麽用?PHP RevSliderWpml::isAllLangsInArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RevSliderWpml
的用法示例。
在下文中一共展示了RevSliderWpml::isAllLangsInArray方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addLangFromData
/**
*
* add language (add slide that connected to current slide) from data
*/
private function addLangFromData($data)
{
$sliderID = RevSliderFunctions::getVal($data, "sliderid");
$slideID = RevSliderFunctions::getVal($data, "slideid");
$lang = RevSliderFunctions::getVal($data, "lang");
//duplicate slide
$slider = new RevSlider();
$slider->initByID($sliderID);
$newSlideID = $slider->duplicateSlide($slideID);
//update new slide
$this->initByID($newSlideID);
$arrUpdate = array();
$arrUpdate["lang"] = $lang;
$arrUpdate["parentid"] = $slideID;
$this->updateParamsInDB($arrUpdate);
$urlIcon = RevSliderWpml::getFlagUrl($lang);
$title = RevSliderWpml::getLangTitle($lang);
$newSlide = new RevSlide();
$newSlide->initByID($slideID);
$arrLangCodes = $newSlide->getArrChildLangCodes();
$isAll = RevSliderWpml::isAllLangsInArray($arrLangCodes);
$html = "<li>\r\n\t\t\t\t\t<img id=\"icon_lang_" . $newSlideID . "\" class=\"icon_slide_lang\" src=\"" . $urlIcon . "\" title=\"" . $title . "\" data-slideid=\"" . $newSlideID . "\" data-lang=\"" . $lang . "\">\r\n\t\t\t\t\t<div class=\"icon_lang_loader loader_round\" style=\"display:none\"></div>\t\t\t\t\t\t\t\t\r\n\t\t\t\t</li>";
$response = array();
$response["operation"] = "add";
$response["isAll"] = $isAll;
$response["html"] = $html;
return $response;
}
示例2: stripslashes
if ($bgPosition == 'percentage') {
$bgStyle .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
} else {
$bgStyle .= "background-position: " . $bgPosition . ";";
}
$bgStyle .= "background-repeat: " . $bgRepeat . ";";
//set language flag url
$isWpmlExists = RevSliderWpml::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$showLangs = false;
if ($isWpmlExists && $useWpml == "on") {
$showLangs = true;
$arrChildLangs = $slide->getArrChildrenLangs();
$arrSlideLangCodes = $slide->getArrChildLangCodes();
$addItemStyle = "";
if (RevSliderWpml::isAllLangsInArray($arrSlideLangCodes)) {
$addItemStyle = "style='display:none'";
}
}
$imageFilepath = $slide->getImageFilepath();
$urlImageForView = $slide->getThumbUrl();
$slideTitle = $slide->getParam("title", "Slide");
$title = $slideTitle;
$filename = $slide->getImageFilename();
$imageAlt = stripslashes($slideTitle);
if (empty($imageAlt)) {
$imageAlt = "slide";
}
if ($bgType == "image") {
$title .= " (" . $filename . ")";
}