当前位置: 首页>>代码示例>>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;未经允许,请勿转载。