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


PHP RevSliderOperations::getArrAnimations方法代码示例

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


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

示例1: array

if (empty($slideDelay)) {
    $slideDelay = $sliderDelay;
}
//add tools.min.js
wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', array(), RevSliderGlobals::SLIDER_REVISION);
$arrLayers = $slide->getLayers();
//set Layer settings
$cssContent = $operations->getCaptionsContent();
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
//$arrCaptionClassesSorted = $operations->getArrCaptionClasses($cssContent);
$arrCaptionClassesSorted = RevSliderCssParser::get_captions_sorted();
$arrFontFamily = $operations->getArrFontFamilys($slider);
$arrCSS = $operations->getCaptionsContentArray();
$arrButtonClasses = $operations->getButtonClasses();
$arrAnim = $operations->getFullCustomAnimations();
$arrAnimDefaultIn = $operations->getArrAnimations(false);
$arrAnimDefaultOut = $operations->getArrEndAnimations(false);
$arrAnimDefault = array_merge($arrAnimDefaultIn, $arrAnimDefaultOut);
//set various parameters needed for the page
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$imageUrl = $slide->getImageUrl();
$imageID = $slide->getImageID();
$slider_type = $slider->getParam('source_type', 'gallery');
/**
 * Get Slider params which will be used as default on Slides
 * @since: 5.0
 **/
$def_background_fit = $slider->getParam('def-background_fit', 'cover');
$def_image_source_type = $slider->getParam('def-image_source_type', 'full');
$def_bg_fit_x = $slider->getParam('def-bg_fit_x', '100');
开发者ID:jfbelisle,项目名称:magexpress,代码行数:31,代码来源:slide-editor.php

示例2: add_animation_settings_to_layer

 /**
  * add missing new animation fields to the layers as all animations would be broken without this
  * @since 5.0
  */
 public static function add_animation_settings_to_layer($sliders = false)
 {
     $sr = new RevSlider();
     $sl = new RevSliderSlide();
     if ($sliders === false) {
         //do it on all Sliders
         $sliders = $sr->getArrSliders(false);
     } else {
         $sliders = array($sliders);
     }
     $inAnimations = RevSliderOperations::getArrAnimations(true);
     $outAnimations = RevSliderOperations::getArrEndAnimations(true);
     if (!empty($sliders) && is_array($sliders)) {
         foreach ($sliders as $slider) {
             $slides = $slider->getSlides();
             $staticID = $sl->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 = array_merge($slides, array($msl));
                 }
             }
             if (!empty($slides) && is_array($slides)) {
                 foreach ($slides as $slide) {
                     $layers = $slide->getLayers();
                     if (!empty($layers) && is_array($layers)) {
                         foreach ($layers as $lk => $layer) {
                             if (RevSliderFunctions::getVal($layer, 'x_start', false) == false) {
                                 //values are not set, set them now through
                                 $animation = RevSliderFunctions::getVal($layer, 'animation', 'tp-fade');
                                 $endanimation = RevSliderFunctions::getVal($layer, 'endanimation', 'tp-fade');
                                 if ($animation == 'fade') {
                                     $animation = 'tp-fade';
                                 }
                                 if ($endanimation == 'fade') {
                                     $endanimation = 'tp-fade';
                                 }
                                 $anim_values = array();
                                 foreach ($inAnimations as $handle => $anim) {
                                     if ($handle == $animation) {
                                         $anim_values = isset($anim['params']) ? $anim['params'] : '';
                                         if (!is_array($anim_values)) {
                                             $anim_values = json_encode($anim_values);
                                         }
                                         break;
                                     }
                                 }
                                 $anim_endvalues = array();
                                 foreach ($outAnimations as $handle => $anim) {
                                     if ($handle == $endanimation) {
                                         $anim_endvalues = isset($anim['params']) ? $anim['params'] : '';
                                         if (!is_array($anim_endvalues)) {
                                             $anim_endvalues = json_encode($anim_endvalues);
                                         }
                                         break;
                                     }
                                 }
                                 $layers[$lk]['x_start'] = RevSliderFunctions::getVal($anim_values, 'movex', 'inherit');
                                 $layers[$lk]['x_end'] = RevSliderFunctions::getVal($anim_endvalues, 'movex', 'inherit');
                                 $layers[$lk]['y_start'] = RevSliderFunctions::getVal($anim_values, 'movey', 'inherit');
                                 $layers[$lk]['y_end'] = RevSliderFunctions::getVal($anim_endvalues, 'movey', 'inherit');
                                 $layers[$lk]['z_start'] = RevSliderFunctions::getVal($anim_values, 'movez', 'inherit');
                                 $layers[$lk]['z_end'] = RevSliderFunctions::getVal($anim_endvalues, 'movez', 'inherit');
                                 $layers[$lk]['x_rotate_start'] = RevSliderFunctions::getVal($anim_values, 'rotationx', 'inherit');
                                 $layers[$lk]['x_rotate_end'] = RevSliderFunctions::getVal($anim_endvalues, 'rotationx', 'inherit');
                                 $layers[$lk]['y_rotate_start'] = RevSliderFunctions::getVal($anim_values, 'rotationy', 'inherit');
                                 $layers[$lk]['y_rotate_end'] = RevSliderFunctions::getVal($anim_endvalues, 'rotationy', 'inherit');
                                 $layers[$lk]['z_rotate_start'] = RevSliderFunctions::getVal($anim_values, 'rotationz', 'inherit');
                                 $layers[$lk]['z_rotate_end'] = RevSliderFunctions::getVal($anim_endvalues, 'rotationz', 'inherit');
                                 $layers[$lk]['scale_x_start'] = RevSliderFunctions::getVal($anim_values, 'scalex', 'inherit');
                                 if (intval($layers[$lk]['scale_x_start']) > 10) {
                                     $layers[$lk]['scale_x_start'] /= 100;
                                 }
                                 $layers[$lk]['scale_x_end'] = RevSliderFunctions::getVal($anim_endvalues, 'scalex', 'inherit');
                                 if (intval($layers[$lk]['scale_x_end']) > 10) {
                                     $layers[$lk]['scale_x_end'] /= 100;
                                 }
                                 $layers[$lk]['scale_y_start'] = RevSliderFunctions::getVal($anim_values, 'scaley', 'inherit');
                                 if (intval($layers[$lk]['scale_y_start']) > 10) {
                                     $layers[$lk]['scale_y_start'] /= 100;
                                 }
                                 $layers[$lk]['scale_y_end'] = RevSliderFunctions::getVal($anim_endvalues, 'scaley', 'inherit');
                                 if (intval($layers[$lk]['scale_y_end']) > 10) {
                                     $layers[$lk]['scale_y_end'] /= 100;
                                 }
                                 $layers[$lk]['skew_x_start'] = RevSliderFunctions::getVal($anim_values, 'skewx', 'inherit');
                                 $layers[$lk]['skew_x_end'] = RevSliderFunctions::getVal($anim_endvalues, 'skewx', 'inherit');
                                 $layers[$lk]['skew_y_start'] = RevSliderFunctions::getVal($anim_values, 'skewy', 'inherit');
                                 $layers[$lk]['skew_y_end'] = RevSliderFunctions::getVal($anim_endvalues, 'skewy', 'inherit');
                                 $layers[$lk]['opacity_start'] = RevSliderFunctions::getVal($anim_values, 'captionopacity', 'inherit');
                                 $layers[$lk]['opacity_end'] = RevSliderFunctions::getVal($anim_endvalues, 'captionopacity', 'inherit');
                             }
//.........这里部分代码省略.........
开发者ID:dawnthemes,项目名称:tkb,代码行数:101,代码来源:plugin-update.class.php

示例3: putCreativeLayer

 /**
  * put creative layer
  */
 private function putCreativeLayer(RevSliderSlide $slide, $static_slide = false)
 {
     $layers = $slide->getLayers();
     $slider_type = $this->slider->getParam('slider-type');
     $icon_sets = RevSliderBase::set_icon_sets(array());
     $ignore_styles = array('font-family', 'color', 'font-weight', 'font-style', 'text-decoration');
     $customAnimations = RevSliderOperations::getCustomAnimations('customin');
     //get all custom animations
     $customEndAnimations = RevSliderOperations::getCustomAnimations('customout');
     //get all custom animations
     $startAnimations = RevSliderOperations::getArrAnimations(false);
     //only get the standard animations
     $endAnimations = RevSliderOperations::getArrEndAnimations(false);
     //only get the standard animations
     $lazyLoad = $this->slider->getParam('lazy_load_type', false);
     if ($lazyLoad === false) {
         //do fallback checks to removed lazy_load value since version 5.0 and replaced with an enhanced version
         $old_ll = $this->slider->getParam('lazy_load', 'off');
         $lazyLoad = $old_ll == 'on' ? 'all' : 'none';
     }
     $isTemplate = $this->slider->getParam('template', 'false');
     $enable_custom_size_notebook = $this->slider->getParam('enable_custom_size_notebook', 'off');
     $enable_custom_size_tablet = $this->slider->getParam('enable_custom_size_tablet', 'off');
     $enable_custom_size_iphone = $this->slider->getParam('enable_custom_size_iphone', 'off');
     $enabled_sizes = array('desktop' => 'on', 'notebook' => $enable_custom_size_notebook, 'tablet' => $enable_custom_size_tablet, 'mobile' => $enable_custom_size_iphone);
     $adv_resp_sizes = $enable_custom_size_notebook == 'on' || $enable_custom_size_tablet == 'on' || $enable_custom_size_iphone == 'on' ? true : false;
     $slider_selectable = $this->slider->getParam('def-layer_selection', 'off');
     $image_source_type = $this->slider->getParam('def-image_source_type', 'full');
     if (empty($layers)) {
         return false;
     }
     $zIndex = 5;
     $slideID = $slide->getID();
     $in_class_usage = array();
     foreach ($layers as $layer) {
         $unique_id = RevSliderFunctions::getVal($layer, 'unique_id');
         if ($unique_id == '') {
             $unique_id = $zIndex - 4;
         }
         //$visible = RevSliderFunctions::getVal($layer, 'visible', true);
         //if($visible == false) continue;
         $type = RevSliderFunctions::getVal($layer, 'type', 'text');
         $svg_val = '';
         //set if video full screen
         $videoclass = '';
         $isFullWidthVideo = false;
         if ($type == 'video') {
             $videoclass = ' tp-videolayer';
             $videoData = RevSliderFunctions::getVal($layer, 'video_data');
             if (!empty($videoData)) {
                 $videoData = (array) $videoData;
                 $isFullWidthVideo = RevSliderFunctions::getVal($videoData, 'fullwidth');
                 $isFullWidthVideo = RevSliderFunctions::strToBool($isFullWidthVideo);
             } else {
                 $videoData = array();
             }
         } elseif ($type == 'audio') {
             $videoclass = ' tp-audiolayer';
             $videoData = RevSliderFunctions::getVal($layer, 'video_data');
             if (!empty($videoData)) {
                 $videoData = (array) $videoData;
             } else {
                 $videoData = array();
             }
         }
         $class = RevSliderFunctions::getVal($layer, 'style');
         if (trim($class) !== '') {
             $this->class_include['.' . trim($class)] = true;
             //add classname for style inclusion
             //get class styles for further compare usage
             if (!isset($in_class_usage[trim($class)])) {
                 $in_class_usage[trim($class)] = RevSliderOperations::getCaptionsContentArray(trim($class));
             }
         }
         //set defaults for stylings
         $dff = '';
         $dta = 'left';
         $dttr = 'none';
         $dfs = 'normal';
         $dtd = 'none';
         $dpa = '0px 0px 0px 0px';
         $dbs = 'none';
         $dbw = '0px';
         $dbr = '0px 0px 0px 0px';
         $dc = 'auto';
         $dfos = false;
         $dlh = false;
         $dfw = false;
         $dco = false;
         $dcot = 1;
         $dbc = 'transparent';
         $dbt = 1;
         $dboc = 'transparent';
         $dbot = 1;
         /**
          * remove this following to get back to 5.0.4.1 in terms of output styling
          **/
//.........这里部分代码省略.........
开发者ID:surreal8,项目名称:wptheme,代码行数:101,代码来源:output.class.php


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