当前位置: 首页>>代码示例>>PHP>>正文


PHP UniteWpmlRev::isAllLangsInArray方法代码示例

本文整理汇总了PHP中UniteWpmlRev::isAllLangsInArray方法的典型用法代码示例。如果您正苦于以下问题:PHP UniteWpmlRev::isAllLangsInArray方法的具体用法?PHP UniteWpmlRev::isAllLangsInArray怎么用?PHP UniteWpmlRev::isAllLangsInArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UniteWpmlRev的用法示例。


在下文中一共展示了UniteWpmlRev::isAllLangsInArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addLangFromData

 /**
  * 
  * add language (add slide that connected to current slide) from data
  */
 private function addLangFromData($data)
 {
     $sliderID = UniteFunctionsRev::getVal($data, "sliderid");
     $slideID = UniteFunctionsRev::getVal($data, "slideid");
     $lang = UniteFunctionsRev::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 = UniteWpmlRev::getFlagUrl($lang);
     $title = UniteWpmlRev::getLangTitle($lang);
     $newSlide = new RevSlide();
     $newSlide->initByID($slideID);
     $arrLangCodes = $newSlide->getArrChildLangCodes();
     $isAll = UniteWpmlRev::isAllLangsInArray($arrLangCodes);
     $html = "<li>\n\t\t\t\t\t\t\t\t<img id=\"icon_lang_" . $newSlideID . "\" class=\"icon_slide_lang\" src=\"" . $urlIcon . "\" title=\"" . $title . "\" data-slideid=\"" . $newSlideID . "\" data-lang=\"" . $lang . "\">\n\t\t\t\t\t\t\t\t<div class=\"icon_lang_loader loader_round\" style=\"display:none\"></div>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</li>";
     $response = array();
     $response["operation"] = "add";
     $response["isAll"] = $isAll;
     $response["html"] = $html;
     return $response;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:32,代码来源:revslider_slide.class.php

示例2: stripslashes

 if ($bgPosition == 'percentage') {
     $bgStyle .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
 } else {
     $bgStyle .= "background-position: " . $bgPosition . ";";
 }
 $bgStyle .= "background-repeat: " . $bgRepeat . ";";
 //set language flag url
 $isWpmlExists = UniteWpmlRev::isWpmlExists();
 $useWpml = $slider->getParam("use_wpml", "off");
 $showLangs = false;
 if ($isWpmlExists && $useWpml == "on") {
     $showLangs = true;
     $arrChildLangs = $slide->getArrChildrenLangs();
     $arrSlideLangCodes = $slide->getArrChildLangCodes();
     $addItemStyle = "";
     if (UniteWpmlRev::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 . ")";
 }
开发者ID:pupsikus,项目名称:bs.test,代码行数:31,代码来源:slides_list.php


注:本文中的UniteWpmlRev::isAllLangsInArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。