當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RevSliderWpml::getLangTitle方法代碼示例

本文整理匯總了PHP中RevSliderWpml::getLangTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP RevSliderWpml::getLangTitle方法的具體用法?PHP RevSliderWpml::getLangTitle怎麽用?PHP RevSliderWpml::getLangTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RevSliderWpml的用法示例。


在下文中一共展示了RevSliderWpml::getLangTitle方法的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;
 }
開發者ID:hathbanger,項目名稱:squab,代碼行數:32,代碼來源:slide.class.php

示例2: foreach

							<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;
            ?>
" data-lang="<?php 
開發者ID:jfbelisle,項目名稱:magexpress,代碼行數:31,代碼來源:slides-list.php


注:本文中的RevSliderWpml::getLangTitle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。