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


PHP RevSlide::getStaticSlideID方法代碼示例

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


在下文中一共展示了RevSlide::getStaticSlideID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onAjaxAction


//.........這裏部分代碼省略.........
             case "change_slide_title":
                 $slide->updateTitleByID($data);
                 self::ajaxResponseSuccess(__('Title updated', 'revslider'));
                 break;
             case "change_slide_image":
                 $slide->updateSlideImageFromData($data);
                 $sliderID = RevSliderFunctions::getVal($data, "slider_id");
                 self::ajaxResponseSuccessRedirect(__("Slide changed", 'revslider'), self::getViewUrl(self::VIEW_SLIDE, "id=new&slider={$sliderID}"));
                 break;
             case "preview_slide":
                 $operations->putSlidePreviewByData($data);
                 break;
             case "preview_slider":
                 $sliderID = RevSliderFunctions::getPostGetVariable("sliderid");
                 $do_markup = RevSliderFunctions::getPostGetVariable("only_markup");
                 if ($do_markup == 'true') {
                     $operations->previewOutputMarkup($sliderID);
                 } else {
                     $operations->previewOutput($sliderID);
                 }
                 break;
             case "get_import_slides_data":
                 $slides = array();
                 if (!is_array($data)) {
                     $slider->initByID(intval($data));
                     $full_slides = $slider->getSlides();
                     //static slide is missing
                     if (!empty($full_slides)) {
                         foreach ($full_slides as $slide_id => $mslide) {
                             $slides[$slide_id]['layers'] = $mslide->getLayers();
                             $slides[$slide_id]['params'] = $mslide->getParams();
                         }
                     }
                     $staticID = $slide->getStaticSlideID($slider->getID());
                     if ($staticID !== false) {
                         $msl = new RevSliderSlide();
                         if (strpos($staticID, 'static_') === false) {
                             $staticID = 'static_' . $slider->getID();
                         }
                         $msl->initByID($staticID);
                         if ($msl->getID() !== '') {
                             $slides[$msl->getID()]['layers'] = $msl->getLayers();
                             $slides[$msl->getID()]['params'] = $msl->getParams();
                             $slides[$msl->getID()]['params']['title'] = __('Static Slide', 'revslider');
                         }
                     }
                 }
                 if (!empty($slides)) {
                     self::ajaxResponseData(array('slides' => $slides));
                 } else {
                     self::ajaxResponseData('');
                 }
                 break;
             case "toggle_slide_state":
                 $currentState = $slide->toggleSlideStatFromData($data);
                 self::ajaxResponseData(array("state" => $currentState));
                 break;
             case "toggle_hero_slide":
                 $currentHero = $slider->setHeroSlide($data);
                 self::ajaxResponseSuccess(__('Slide is now the new active Hero Slide', 'revslider'));
                 break;
             case "slide_lang_operation":
                 $responseData = $slide->doSlideLangOperation($data);
                 self::ajaxResponseData($responseData);
                 break;
             case "update_general_settings":
開發者ID:ngocthangict,項目名稱:edo,代碼行數:67,代碼來源:revslider-admin.class.php

示例2: getStaticSlideForExport

 /**
  *
  * get slides for export
  */
 private function getStaticSlideForExport($useDummy = false)
 {
     $arrSlidesExport = array();
     $slide = new RevSlide();
     $staticID = $slide->getStaticSlideID($this->id);
     if ($staticID !== false) {
         $slideNew = array();
         $slide->initByStaticID($staticID);
         $slideNew["params"] = $slide->getParamsForExport();
         $slideNew["slide_order"] = $slide->getOrder();
         $slideNew["layers"] = $slide->getLayersForExport($useDummy);
         $arrSlidesExport[] = $slideNew;
     }
     return $arrSlidesExport;
 }
開發者ID:networksoft,項目名稱:networksoft.com.co,代碼行數:19,代碼來源:revslider_slider.class.php


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