本文整理汇总了PHP中RevSliderWpml::getFlagUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderWpml::getFlagUrl方法的具体用法?PHP RevSliderWpml::getFlagUrl怎么用?PHP RevSliderWpml::getFlagUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderWpml
的用法示例。
在下文中一共展示了RevSliderWpml::getFlagUrl方法的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: foreach
<span class="slide-col col-handle">
<div class="col-handle-inside">
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
</div>
</span>
<div class="clear"></div>
<?php
if ($showLangs == true) {
?>
<ul class="list_slide_icons">
<?php
foreach ($arrChildLangs as $arrLang) {
$isParent = RevSliderFunctions::boolToStr($arrLang["isparent"]);
$childSlideID = $arrLang["slideid"];
$lang = $arrLang["lang"];
$urlFlag = RevSliderWpml::getFlagUrl($lang);
$langTitle = RevSliderWpml::getLangTitle($lang);
?>
<li>
<img id="icon_lang_<?php
echo $childSlideID;
?>
" class="icon_slide_lang" src="<?php
echo $urlFlag;
?>
" title="<?php
echo $langTitle;
?>
" data-slideid="<?php
echo $childSlideID;
?>