本文整理汇总了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';
}