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


PHP RevSlider::getSlides方法代码示例

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


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

示例1: updateDynamicCaptions

 /**
  *
  * update dynamic-captions css file content
  */
 public static function updateDynamicCaptions($full = false)
 {
     if ($full) {
         $captions = array();
         $captions = RevOperations::getCaptionsContentArray();
         $styles = UniteCssParserRev::parseArrayToCss($captions, "\n");
         //write styles into dynamic css
         //UniteFunctionsRev::writeFile($styles, GlobalsRevSlider::$filepath_dynamic_captions);
     } else {
         //go through all sliders and check which classes are used, get all classes from DB and write them into the file
         $slider = new RevSlider();
         $arrSliders = $slider->getArrSliders();
         $classes = array();
         //get used classes
         if (!empty($arrSliders)) {
             foreach ($arrSliders as $slider) {
                 try {
                     $slides = $slider->getSlides();
                     if (!empty($slides)) {
                         foreach ($slides as $slide) {
                             $layers = $slide->getLayers();
                             if (!empty($layers)) {
                                 foreach ($layers as $layer) {
                                     if (isset($layer['style'])) {
                                         if (!empty($layer['style'])) {
                                             $classes[$layer['style']] = true;
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 } catch (Exception $e) {
                     $errorMessage = "ERROR: " . $e->getMessage();
                 }
             }
         }
         if (!empty($classes)) {
             $captions = array();
             foreach ($classes as $class => $val) {
                 $captionCheck = RevOperations::getCaptionsContentArray($class);
                 if (!empty($captionCheck)) {
                     $captions[] = $captionCheck;
                 }
             }
             $styles = UniteCssParserRev::parseArrayToCss($captions, "\n");
             //write styles into dynamic css
             //UniteFunctionsRev::writeFile($styles, GlobalsRevSlider::$filepath_dynamic_captions);
         }
     }
 }
开发者ID:misfist,项目名称:missdrepants-network,代码行数:55,代码来源:revslider_operations.class.php

示例2: getSlideTemplates

 /**
  * 
  * get slide template 
  * currently it's the first slide in the slider gallery
  */
 private function getSlideTemplates()
 {
     $sliderTemplateID = $this->getParam("slider_template_id");
     if (empty($sliderTemplateID)) {
         UniteFunctionsRev::throwError("You must provide a template for the slider show.");
     }
     $sliderTemplate = new RevSlider();
     $sliderTemplate->initByID($sliderTemplateID);
     if ($sliderTemplate->isSlidesFromPosts()) {
         UniteFunctionsRev::throwError("The slider that is template must be from gallery");
     }
     $arrSlides = $sliderTemplate->getSlides(true);
     return $arrSlides;
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:19,代码来源:revslider_slider.class.php

示例3: onAjaxAction


//.........这里部分代码省略.........
                 $arrAnims = $operations->deleteCustomAnim($data);
                 self::ajaxResponseSuccess(__("Animation deleted", 'revslider'), $arrAnims);
                 //,array("arrCaptions"=>$arrCaptions)
                 break;
             case "update_slides_order":
                 $slider->updateSlidesOrderFromData($data);
                 self::ajaxResponseSuccess(__("Order updated", 'revslider'));
                 break;
             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":
开发者ID:ngocthangict,项目名称:edo,代码行数:67,代码来源:revslider-admin.class.php

示例4: intval

<?php

if (!defined('ABSPATH')) {
    exit;
}
//get input
$slideID = RevSliderFunctions::getGetVar("id");
if ($slideID == 'new') {
    //add new transparent slide
    $sID = intval(RevSliderFunctions::getGetVar("slider"));
    if ($sID > 0) {
        $revs = new RevSlider();
        $revs->initByID($sID);
        //check if we already have slides, if yes, go to first
        $arrS = $revs->getSlides(false);
        if (empty($arrS)) {
            $slideID = $revs->createSlideFromData(array('sliderid' => $sID), true);
        } else {
            $slideID = key($arrS);
        }
    }
}
$patternViewSlide = self::getViewUrl("slide", "id=[slideid]");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
$operations = new RevSliderOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
开发者ID:jfbelisle,项目名称:magexpress,代码行数:31,代码来源:slide-editor.php

示例5: foreach

        $tmpl->write_template_markup($template);
    }
}
?>
			<div style="clear:both;width:100%"></div>
		</div>
		<div style="clear:both;width:100%"></div>
	</div>


	<!-- THE ALL SLIDES GROUP -->
	<div class="revolution-all-slides-templates revolution-template-groups">
		<?php 
if (!empty($all_slider)) {
    foreach ($all_slider as $c_slider) {
        $c_slides = $c_slider->getSlides(false);
        //$c_slides = $c_slider->getArrSlideNames();
        $c_title = $c_slider->getTitle();
        $width = $c_slider->getParam("width", 1240);
        $height = $c_slider->getParam("height", 868);
        /*if(!empty($c_slider['filter']) && is_array($c_slider['filter'])){
        			foreach($c_slider['filter'] as $f => $v){
        				$c_slider['filter'][$f] = 'temp_'.$v;
        			}
        		}*/
        if (!empty($c_slides)) {
            ?>
					<div class="template_group_wrappers <?php 
            //if(isset($c_slider['filter'])){ echo implode(' ', $c_slider['filter']); }
            ?>
">
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:31,代码来源:template-selector.php

示例6: build

 static function build($post)
 {
     $description = str_replace(']]>', ']]&gt;', apply_filters('the_content', get_the_content()));
     $standard_details = wpcasa_standard_details();
     $custom = get_post_custom($post->ID);
     $price = $custom['_price'][0];
     $address = $custom['_map_address'][0];
     $property = new ctwizPropertyModel(array("id" => (string) $post->ID, "url" => esc_url(apply_filters('the_permalink', get_permalink())), 'description' => $description, 'publishDate' => get_the_modified_time('U'), 'requested' => $price, 'currency' => wpcasa_get_currency(), 'address' => $address));
     $type_terms = get_the_terms($post->ID, "property-type");
     if ($type_terms) {
         foreach ($type_terms as $term) {
             $prope = ctwizKeywordModel::_($term->name, "types");
             if ($prope) {
                 $property->houseType = $prope;
                 break;
             }
         }
     } else {
         return false;
     }
     $agent_display_option = get_post_meta($post->ID, 'REAL_HOMES_agent_display_option', true);
     if ($agent_display_option == "my_profile_info") {
         $property->agentMobilePhone = get_the_author_meta('mobile_number');
         $property->agentPhone = get_the_author_meta('office_number');
         $property->agentFax = get_the_author_meta('fax_number');
         $property->agentEmail = get_the_author_meta('user_email');
         $property->agentName = get_the_author_meta('display_name');
     } else {
         $property_agent = get_post_meta($post->ID, 'REAL_HOMES_agents', true);
         if (!empty($property_agent) && intval($property_agent) > 0) {
             $agent_id = intval($property_agent);
             $property->agentMobilePhone = get_post_meta($agent_id, 'REAL_HOMES_mobile_number', true);
             $property->agentPhone = get_post_meta($agent_id, 'REAL_HOMES_office_number', true);
             $property->agentFax = get_post_meta($agent_id, 'REAL_HOMES_fax_number', true);
             $property->agentEmail = get_post_meta($agent_id, 'REAL_HOMES_agent_email', true);
             $property->agentName = get_the_title($agent_id);
         }
     }
     if (!empty($standard_details)) {
         foreach ($standard_details as $feature => $value) {
             $property_details_value = get_post_meta(get_the_ID(), '_' . $feature, true);
             $prop = ctwizKeywordModel::_($value['label']);
             if ($prop) {
                 //                    echo $property_details_value."\n";
                 $property->{$prop} = $property_details_value;
             }
         }
     }
     $property_features_terms = get_the_terms(get_the_ID(), 'feature');
     if ($property_features_terms) {
         foreach ($property_features_terms as $term) {
             $prop = ctwizKeywordModel::_($term->name);
             if ($prop) {
                 $property->{$prop} = true;
             }
         }
     }
     $status = $custom['_price_status'][0];
     if (!empty($status)) {
         $prope = ctwizKeywordModel::_($status);
         if ($prope == "forRent") {
             $property->forRent = true;
         }
         if ($prope == "forSale") {
             $property->forSale = true;
         }
     }
     $properties_images = get_posts(array("post_parent" => intval($post->ID), 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'));
     $photos = array();
     foreach ($properties_images as $image_id) {
         $photos[] = array('url' => wp_get_attachment_url($image_id->ID), 'caption' => $image_id->post_name);
     }
     // get rev slider
     if (isset($custom['_space'][0])) {
         list($a, $b) = explode(" ", str_replace(array("[", "]"), array("", ""), $custom['_space'][0]));
         try {
             $slider = new RevSlider();
             $slider->initByMixed($b);
             $slides = $slider->getSlides(true);
             foreach ($slides as $slide) {
                 $photos[] = array('url' => $slide->getImageUrl());
             }
         } catch (Exception $e) {
             //don't care
         }
     }
     if (has_post_thumbnail()) {
         $image_id = get_post_thumbnail_id();
         $image_url = wp_get_attachment_url($image_id);
         $photos[] = array('url' => $image_url);
     }
     $property->photos = $photos;
     return $property;
 }
开发者ID:CTwizcom,项目名称:CTwiz-wordpress,代码行数:94,代码来源:wpCasa.php

示例7: RevSlider

}
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSliders = $slider->getArrSlidersShort($sliderID);
$selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
$numSliders = count($arrSliders);
//set iframe parameters
//$width = $sliderParams["width"];
//$height = $sliderParams["height"];
$width = isset($sliderParams["width"]) ? $sliderParams["width"] : '';
$height = isset($sliderParams["height"]) ? $sliderParams["height"] : '';
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
$arrSlides = $slider->getSlides(false);
$numSlides = count($arrSlides);
$linksSliderSettings = self::getViewUrl(RevSliderAdmin::VIEW_SLIDER, "id={$sliderID}");
$patternViewSlide = self::getViewUrl("slide", "id=[slideid]");
//treat in case of slides from gallery
if ($slider->isSlidesFromPosts() == false) {
    $templateName = "slides_gallery";
    //handle wpml
    $isWpmlExists = UniteWpmlRev::isWpmlExists();
    $useWpml = $slider->getParam("use_wpml", "off");
    $wpmlActive = false;
    if ($isWpmlExists && $useWpml == "on") {
        $wpmlActive = true;
        //get langs floating menu
        $urlIconDelete = self::$url_plugin . "images/icon-trash.png";
        $urlIconEdit = self::$url_plugin . "images/icon-edit.png";
开发者ID:rinodung,项目名称:opencart-15x-flat-admin,代码行数:31,代码来源:slides.php

示例8: RevSlider

}
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
$arrSliders = $slider->getArrSlidersShort($sliderID);
$selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
$numSliders = count($arrSliders);
//set iframe parameters
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:{$iframeWidth}px;height:{$iframeHeight}px;";
//handle wpml
$isWpmlExists = UniteWpmlRev::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$langFilterValue = null;
$wpmlActive = false;
if ($isWpmlExists && $useWpml == "on") {
    $wpmlActive = true;
    $arrLangs = UniteWpmlRev::getArrLanguages();
    $langFilterValue = $operations->getLangFilterValue();
    $selectLangsFilter = UniteFunctionsRev::getHTMLSelect($arrLangs, $langFilterValue, "id='select_lang_filter' ", true);
    $langFloatMenu = UniteWpmlRev::getLangsWithFlagsHtmlList("id='slides_langs_float' class='slides_langs_float'");
}
$arrSlides = $slider->getSlides(false, $langFilterValue);
$numSlides = count($arrSlides);
$linksSliderSettings = self::getViewUrl(RevSliderAdmin::VIEW_SLIDER, "id={$sliderID}");
require self::getPathTemplate("slides");
?>
	
开发者ID:jgabrielfreitas,项目名称:MultipagosTestesAPP,代码行数:30,代码来源:slides.php

示例9: RevSlider

<?php

$sliderID = self::getGetVar("id");
if (empty($sliderID)) {
    UniteFunctionsRev::throwError("Slider ID not found");
}
$slider = new RevSlider();
$slider->initByID($sliderID);
$sliderParams = $slider->getParams();
//set iframe parameters
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:{$iframeWidth}px;height:{$iframeHeight}px;";
$arrSlides = $slider->getSlides();
$numSlides = count($arrSlides);
$linksSliderSettings = self::getViewUrl(RevSliderAdmin::VIEW_SLIDER, "id={$sliderID}");
require self::getPathTemplate("slides");
?>
	
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:20,代码来源:slides.php

示例10: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $operations = new RevOperations();
     $sliderID = $this->getRequest()->getParam('id');
     $storeID = $this->getRequest()->getParam('store_id', 0);
     if (empty($sliderID)) {
         UniteFunctionsRev::throwError("Slider ID not found");
     }
     $slider = new RevSlider();
     $slider->initByID($sliderID);
     $sliderParams = $slider->getParams();
     $arrSliders = $slider->getArrSlidersShort($sliderID);
     $selectSliders = UniteFunctionsRev::getHTMLSelect($arrSliders, "", "id='selectSliders'", true);
     $numSliders = count($arrSliders);
     //set iframe parameters
     $width = $sliderParams["width"];
     $height = $sliderParams["height"];
     $iframeWidth = $width + 60;
     $iframeHeight = $height + 50;
     $iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
     $arrSlides = $slider->getSlides(false, $storeID);
     $numSlides = count($arrSlides);
     $linksSliderSettings = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/' . $sliderID);
     $patternViewSlide = $this->helper("adminhtml")->getUrl('adminhtml/nwdrevslider/slider/id/[slideid]');
     $useStaticLayers = $slider->getParam("enable_static_layers", "off");
     //treat in case of slides from gallery
     if ($slider->isSlidesFromPosts() == false) {
         $templateName = "slides_gallery";
         // store view
         $selectStoreView = Mage::app()->getLayout()->createBlock('core/html_select')->setName('select_storeview')->setId('select_storeview')->setTitle('Store View')->setValue($storeID)->setOptions(Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true))->getHtml();
         $this->assign('storeID', $storeID);
         $this->assign('selectStoreView', $selectStoreView);
         $this->setTemplate('nwdthemes/revslider/templates/slides_gallery.phtml');
     } else {
         //slides from posts
         $templateName = "slides_posts";
         $sourceType = $slider->getParam("source_type", "posts");
         $showSortBy = $sourceType == "posts" ? true : false;
         $showDelete = $sourceType == "specific_posts" ? true : false;
         //get button links
         $urlNewPost = $this->helper('adminhtml')->getUrl('adminhtml/catalog_product/new');
         $linkNewPost = UniteFunctionsRev::getHtmlLink($urlNewPost, $this->__("<i class='revicon-pencil-1'></i>New Product"), "button_new_post", "button-primary revblue", true);
         //get ordering
         $arrSortBy = $this->helper('nwdrevslider')->getArrSortBy();
         $sortBy = $slider->getParam("post_sortby", RevSlider::DEFAULT_POST_SORTBY);
         $selectSortBy = UniteFunctionsRev::getHTMLSelect($arrSortBy, $sortBy, "id='select_sortby'", true);
         $this->assign('showSortBy', $showSortBy);
         $this->assign('showDelete', $showDelete);
         $this->assign('selectSortBy', $selectSortBy);
         $this->assign('linkNewPost', $linkNewPost);
         $this->setTemplate('nwdthemes/revslider/templates/slides_posts.phtml');
     }
     $this->assign('sliderID', $sliderID);
     $this->assign('iframeStyle', $iframeStyle);
     $this->assign('patternViewSlide', $patternViewSlide);
     $this->assign('selectSliders', $selectSliders);
     $this->assign('linksSliderSettings', $linksSliderSettings);
     $this->assign('useStaticLayers', $useStaticLayers);
     $this->assign('arrSlides', $arrSlides);
     $this->assign('slider', $slider);
     $this->assign('numSlides', $numSlides);
     $this->assign('numSliders', $numSliders);
 }
开发者ID:perseusl,项目名称:kingdavid,代码行数:67,代码来源:Slides.php

示例11: previewOutputMarkup

    public function previewOutputMarkup($sliderID, $output = null)
    {
        if ($sliderID == "empty_output") {
            $this->loadingMessageOutput();
            exit;
        }
        if ($output == null) {
            $output = new RevSliderOutput();
        }
        $slider = new RevSlider();
        $slider->initByID($sliderID);
        $output->setPreviewMode();
        //put the output html
        $urlPlugin = "http://yourpluginpath/";
        $urlPreviewPattern = UniteBaseClassRev::$url_ajax_actions . "&client_action=preview_slider&only_markup=true&sliderid=" . $sliderID . "&lang=[lang]&nonce=[nonce]";
        $setBase = Mage::helper('nwdrevslider')->isSsl() ? "https://" : "http://";
        ?>
		<html>
		<head>
			<script type='text/javascript' src='<?php 
        echo $setBase;
        ?>
ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
		</head>
		<body style="padding:0px;margin:0px;">
		<?php 
        //UniteBaseClassRev::$url_plugin
        ob_start();
        ?>
<link rel='stylesheet' href='<?php 
        echo $urlPlugin;
        ?>
css/settings.css?rev=<?php 
        echo GlobalsRevSlider::SLIDER_REVISION;
        ?>
' type='text/css' media='all' />
<?php 
        $_usedStyles = array();
        $_slides = $slider->getSlides();
        foreach ($_slides as $_slide) {
            $_layers = $_slide->getLayers();
            foreach ($_layers as $_layer) {
                $_style = isset($_layer['style']) ? $_layer['style'] : '';
                if ($_style && !in_array($_style, $_usedStyles)) {
                    $_usedStyles[] = $_style;
                }
            }
        }
        echo Mage::helper('nwdrevslider')->inlcudeStyleFonts($_usedStyles);
        $http = Mage::helper('nwdrevslider')->isSsl() ? 'https' : 'http';
        ?>

<script type='text/javascript' src='<?php 
        echo $urlPlugin;
        ?>
js/jquery.themepunch.tools.min.js?rev=<?php 
        echo GlobalsRevSlider::SLIDER_REVISION;
        ?>
'></script>
<script type='text/javascript' src='<?php 
        echo $urlPlugin;
        ?>
js/jquery.themepunch.revolution.min.js?rev=<?php 
        echo GlobalsRevSlider::SLIDER_REVISION;
        ?>
'></script>
<?php 
        $head_content = ob_get_contents();
        ob_clean();
        ob_end_clean();
        ob_start();
        $custom_css = RevOperations::getStaticCss();
        echo $custom_css . "\n\n";
        echo '/*****************' . "\n";
        echo ' ** ' . __('CAPTIONS CSS') . "\n";
        echo ' ****************/' . "\n\n";
        $db = new UniteDBRev();
        $styles = $db->fetch(GlobalsRevSlider::$table_css);
        echo UniteCssParserRev::parseDbArrayToCss($styles, "\n");
        $style_content = ob_get_contents();
        ob_clean();
        ob_end_clean();
        ob_start();
        $output->putSliderBase($sliderID);
        $content = ob_get_contents();
        ob_clean();
        ob_end_clean();
        $script_content = substr($content, strpos($content, '<script type="text/javascript">'), strpos($content, '</script>') + 9 - strpos($content, '<script type="text/javascript">'));
        $content = htmlentities(str_replace($script_content, '', $content));
        $script_content = str_replace('				', '', $script_content);
        $script_content = str_replace(array('<script type="text/javascript">', '</script>'), '', $script_content);
        ?>
		<style>
			body 	 { font-family:sans-serif; font-size:12px;}
			textarea { background:#f1f1f1; border:#ddd; font-size:10px; line-height:16px; margin-bottom:40px; padding:10px;}
			.rev_cont_title { color:#000; text-decoration:none;font-size:14px; line-height:24px; font-weight:800;background: #D5D5D5;padding: 10px;}
			.rev_cont_title a,
			.rev_cont_title a:visited { margin-left:25px;font-size:12px;line-height:12px;float:right;background-color:#8e44ad; color:#fff; padding:8px 10px;text-decoration:none;}
			.rev_cont_title a:hover	  { background-color:#9b59b6}
		</style>
//.........这里部分代码省略.........
开发者ID:perseusl,项目名称:kingdavid,代码行数:101,代码来源:revslider_operations.class.php

示例12: updateDynamicCaptions

 public static function updateDynamicCaptions($full = false)
 {
     if ($full) {
         $captions = array();
         $captions = RevOperations::getCaptionsContentArray();
         $styles = UniteCssParserRev::parseArrayToCss($captions, "\n");
         UniteFunctionsRev::writeFile($styles, GlobalsRevSlider::$filepath_dynamic_captions);
     } else {
         $slider = new RevSlider();
         $arrSliders = $slider->getArrSliders();
         $classes = array();
         if (!empty($arrSliders)) {
             foreach ($arrSliders as $slider) {
                 try {
                     $slides = $slider->getSlides();
                     if (!empty($slides)) {
                         foreach ($slides as $slide) {
                             $layers = $slide->getLayers();
                             if (!empty($layers)) {
                                 foreach ($layers as $layer) {
                                     if (isset($layer['style'])) {
                                         if (!empty($layer['style'])) {
                                             $classes[$layer['style']] = true;
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 } catch (Exception $e) {
                     $errorMessage = "ERROR: " . $e->getMessage();
                 }
             }
         }
         if (!empty($classes)) {
             $captions = array();
             foreach ($classes as $class => $val) {
                 $captionCheck = RevOperations::getCaptionsContentArray($class);
                 if (!get_magic_quotes_gpc()) {
                     $captionCheck = str_replace('"', "'", $captionCheck);
                 } else {
                     $captionCheck = str_replace('"', "'", $captionCheck);
                     $captionCheck = str_replace('\\\\', "", $captionCheck);
                 }
                 if (!empty($captionCheck)) {
                     $captions[] = $captionCheck;
                 }
             }
             $styles = UniteCssParserRev::parseArrayToCss($captions, "\n");
             UniteFunctionsRev::writeFile($styles, GlobalsRevSlider::$filepath_dynamic_captions);
         }
     }
 }
开发者ID:evgrishin,项目名称:se1614,代码行数:53,代码来源:revslider_operations.class.php


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