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


PHP RevSliderFunctions::normalize_device_settings方法代码示例

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


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

示例1: putCreativeLayer


//.........这里部分代码省略.........
                 if (is_string($cover_mode)) {
                     $cover_mode = array('desktop' => $cover_mode, 'notebook' => $cover_mode, 'tablet' => $cover_mode, 'mobile' => $cover_mode);
                 } else {
                     //change to array
                     $cover_mode = (array) $cover_mode;
                 }
                 if ($adv_resp_sizes == true) {
                     $y_is_single = true;
                     $x_is_single = true;
                     if ($scaleX !== '') {
                         if (!is_object($scaleX)) {
                             if (trim($scaleX) == '' || $scaleX == 'NaNpx') {
                                 $scaleX = 'auto';
                             }
                             $myScaleX = $scaleX;
                             foreach ($cover_mode as $cvmk => $cvmv) {
                                 if ($cvmv == 'fullwidth' || $cvmv == 'cover') {
                                     $myScaleX = 'full';
                                 }
                                 if ($cvmv == 'cover-proportional') {
                                     $myScaleX = 'full-proportional';
                                 }
                                 break;
                             }
                         } else {
                             foreach ($cover_mode as $cvmk => $cvmv) {
                                 if ($cvmv == 'fullwidth' || $cvmv == 'cover') {
                                     $scaleX->{$cvmk} = 'full';
                                 }
                                 if ($cvmv == 'cover-proportional') {
                                     $scaleX->{$cvmk} = 'full-proportional';
                                 }
                             }
                             $myScaleX = RevSliderFunctions::normalize_device_settings($scaleX, $enabled_sizes, 'html-array', array('NaNpx' => '', 'auto' => ''));
                             if ($myScaleX == "['','','','']") {
                                 $myScaleX = '';
                             }
                             if (strpos($myScaleX, '[') !== false) {
                                 $y_is_single = false;
                             }
                         }
                         if ($y_is_single) {
                             //force to array if voffset is also array
                             if (!isset($myScaleX)) {
                                 $myScaleX = RevSliderFunctions::get_biggest_device_setting($scaleX, $enabled_sizes);
                             }
                             if (trim($myScaleX) == '' || $myScaleX == 'NaNpx' || $myScaleX == 'auto') {
                                 $myScaleX = '';
                             } else {
                                 $myScaleX = "['" . $myScaleX . "','" . $myScaleX . "','" . $myScaleX . "','" . $myScaleX . "']";
                             }
                         }
                     }
                     if ($scaleY !== '') {
                         if (!is_object($scaleY)) {
                             if (trim($scaleY) == '' || $scaleY == 'NaNpx') {
                                 $scaleY = 'auto';
                             }
                             $myScaleY = $scaleY;
                             foreach ($cover_mode as $cvmk => $cvmv) {
                                 if ($cvmv == 'fullheight' || $cvmv == 'cover') {
                                     $myScaleY = 'full';
                                 }
                                 if ($cvmv == 'cover-proportional') {
                                     $myScaleY = 'full-proportional';
                                 }
开发者ID:surreal8,项目名称:wptheme,代码行数:67,代码来源:output.class.php


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