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


PHP RevSlider::getID方法代碼示例

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


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

示例1: implode

                            $c_slide['img'] = $m_slider['img'];
                            //set slide image
                            if (isset($m_slider['preview'])) {
                                $c_slide['preview'] = $m_slider['preview'];
                                //set preview URL
                            }
                            if (isset($m_slider['filter'])) {
                                $c_slide['filter'] = $m_slider['filter'];
                                //add filters
                            }
                            $c_slide['settings']['width'] = $width;
                            $c_slide['settings']['height'] = $height;
                            if ($c_slide['img'] == '') {
                                //set default image
                            }
                            $tmpl->write_template_markup($c_slide, $c_slider->getID());
                            //add the Slider ID as we want to add a Slider and no Slide
                            break;
                            //only write the first, as we want to add a Slider and not a Slide
                        }
                        echo '<div class="template_thumb_title">' . $c_title . '</div>';
                        ?>
									
								</div><?php 
                    }
                } else {
                    ?>
							<div class="template_group_wrappers not-imported-wrapper <?php 
                    if (isset($m_slider['filter'])) {
                        echo implode(' ', $m_slider['filter']);
                    }
開發者ID:SayenkoDesign,項目名稱:ividf,代碼行數:31,代碼來源:template-slider-selector.php

示例2: 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

示例3: layouts_default_content_sources

function layouts_default_content_sources()
{
    $default_content_sources = array();
    // Static Blocks
    $args = array('posts_per_page' => -1, 'post_type' => 'static_block');
    $posts = get_posts($args);
    $options_static_blocks = array();
    foreach ($posts as $key => $value) {
        $options_static_blocks[$value->ID] = $value->post_title;
    }
    $default_content_sources['Static Block'] = $options_static_blocks;
    // Sidebars
    $sidebars = $GLOBALS['wp_registered_sidebars'];
    $options_sidebars = array();
    foreach ($sidebars as $key => $value) {
        $options_sidebars[$value['id']] = $value['name'];
    }
    $default_content_sources['Sidebar'] = $options_sidebars;
    // Slide shows
    if (class_exists('RevSlider')) {
        $ss = new RevSlider();
        $arrSliders = $ss->getArrSliders();
        $options_sliders = array();
        foreach ($arrSliders as $ss) {
            // Slide data
            $id = $ss->getID();
            $title = $ss->getTitle();
            $alias = $ss->getAlias();
            // Select options
            $options_sliders['RevSlider:' . $alias] = $title;
        }
        $default_content_sources['Slide Show'] = $options_sliders;
    }
    // class_exists('RevSlider')
    return array_merge($default_content_sources);
}
開發者ID:ArnaudGuillou,項目名稱:SiteESBVolley,代碼行數:36,代碼來源:theme-options-filters.php


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