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


PHP RevSliderFunctions::get_biggest_device_setting方法代码示例

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


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

示例1: putCreativeLayer


//.........这里部分代码省略.........
         $htmlEndAt = '';
         $htmlCoverPause = '';
         $htmlDisableOnMobile = '';
         $ids = RevSliderFunctions::getVal($layer, 'attrID');
         $classes = RevSliderFunctions::getVal($layer, 'attrClasses');
         $title = RevSliderFunctions::getVal($layer, 'attrTitle');
         $rel = RevSliderFunctions::getVal($layer, 'attrRel');
         if (trim($ids) == '') {
             if ($static_slide) {
                 $ids = 'slider-' . preg_replace("/[^\\w]+/", "", $this->slider->getID()) . '-layer-' . $unique_id;
             } else {
                 $ids = 'slide-' . preg_replace("/[^\\w]+/", "", $slideID) . '-layer-' . $unique_id;
             }
         }
         $ids = $ids != '' ? ' id="' . $ids . '"' : '';
         $classes = $classes != '' ? ' ' . $classes : '';
         $title = $title != '' ? ' title="' . $title . '"' : '';
         $rel = $rel != '' ? ' rel="' . $rel . '"' : '';
         $inline_styles = '';
         $do_rotation = false;
         $add_data = '';
         $videoType = '';
         $cover = false;
         $toggle_allow = RevSliderFunctions::getVal($layer, 'toggle', false);
         //set html:
         $html = '';
         $html_toggle = '';
         switch ($type) {
             case 'shape':
                 break;
             case 'svg':
                 $max_width = RevSliderFunctions::getVal($layer, 'max_width', 'auto');
                 $max_height = RevSliderFunctions::getVal($layer, 'max_height', 'auto');
                 $max_width = is_object($max_width) ? RevSliderFunctions::get_biggest_device_setting($max_width, $enabled_sizes) : $max_width;
                 $max_height = is_object($max_height) ? RevSliderFunctions::get_biggest_device_setting($max_height, $enabled_sizes) : $max_height;
                 if ($max_width !== 'auto') {
                     $max_width = $max_width !== 'none' ? RevSliderFunctions::add_missing_val($max_width) : $max_width;
                     $inline_styles .= ' min-width: ' . $max_width . '; max-width: ' . $max_width . ';';
                 }
                 if ($max_height !== 'auto') {
                     $max_height = $max_height !== 'none' ? RevSliderFunctions::add_missing_val($max_height) : $max_height;
                     $inline_styles .= ' max-width: ' . $max_height . '; max-width: ' . $max_height . ';';
                 }
                 $svg_val = RevSliderFunctions::getVal($layer, 'svg', false);
                 $static_styles = RevSliderFunctions::getVal($layer, 'static_styles', array());
                 if (!empty($static_styles)) {
                     $static_styles = (array) $static_styles;
                     if (!empty($static_styles['color'])) {
                         if (is_object($static_styles['color'])) {
                             $use_color = RevSliderFunctions::get_biggest_device_setting($static_styles['color'], $enabled_sizes);
                         } else {
                             $use_color = $static_styles['color'];
                         }
                         $def_val = (array) RevSliderFunctions::getVal($layer, 'deformation', array());
                         $color_trans = RevSliderFunctions::getVal($def_val, 'color-transparency', 1);
                         if ($color_trans != $dcot || $use_color != $dco) {
                             if ($color_trans > 0) {
                                 $color_trans *= 100;
                             }
                             $color_trans = intval($color_trans);
                             $use_color = RevSliderFunctions::hex2rgba($use_color, $color_trans);
                             $inline_styles .= ' color: ' . $use_color . ';';
                         }
                     }
                 }
                 break;
开发者ID:surreal8,项目名称:wptheme,代码行数:67,代码来源:output.class.php


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