本文整理汇总了PHP中RevSliderFunctions::get_trans_from_rgba方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderFunctions::get_trans_from_rgba方法的具体用法?PHP RevSliderFunctions::get_trans_from_rgba怎么用?PHP RevSliderFunctions::get_trans_from_rgba使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderFunctions
的用法示例。
在下文中一共展示了RevSliderFunctions::get_trans_from_rgba方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_style_settings_to_layer
//.........这里部分代码省略.........
switch (count($raw_pad)) {
case 1:
$raw_pad = array($raw_pad[0], $raw_pad[0], $raw_pad[0], $raw_pad[0]);
break;
case 2:
$raw_pad = array($raw_pad[0], $raw_pad[1], $raw_pad[0], $raw_pad[1]);
break;
case 3:
$raw_pad = array($raw_pad[0], $raw_pad[1], $raw_pad[2], $raw_pad[1]);
break;
}
$def_val['padding'] = $raw_pad;
}
if (isset($wws['params']['font-style'])) {
$def_val['font-style'] = $wws['params']['font-style'];
}
if (isset($wws['params']['text-decoration'])) {
$def_val['text-decoration'] = $wws['params']['text-decoration'];
}
if (isset($wws['params']['background-color'])) {
if (RevSliderFunctions::isrgb($wws['params']['background-color'])) {
$def_val['background-color'] = RevSliderFunctions::rgba2hex($wws['params']['background-color']);
} else {
$def_val['background-color'] = $wws['params']['background-color'];
}
}
if (isset($wws['params']['background-transparency'])) {
$def_val['background-transparency'] = $wws['params']['background-transparency'];
if ($def_val['background-transparency'] > 1) {
$def_val['background-transparency'] /= 100;
}
} else {
if (isset($wws['params']['background-color'])) {
$def_val['background-transparency'] = RevSliderFunctions::get_trans_from_rgba($wws['params']['background-color'], true);
}
}
if (isset($wws['params']['border-color'])) {
if (RevSliderFunctions::isrgb($wws['params']['border-color'])) {
$def_val['border-color'] = RevSliderFunctions::rgba2hex($wws['params']['border-color']);
} else {
$def_val['border-color'] = $wws['params']['border-color'];
}
}
if (isset($wws['params']['border-style'])) {
$def_val['border-style'] = $wws['params']['border-style'];
}
if (isset($wws['params']['border-width'])) {
$def_val['border-width'] = $wws['params']['border-width'];
}
if (isset($wws['params']['border-radius'])) {
$raw_bor = $wws['params']['border-radius'];
if (!is_array($raw_bor)) {
$raw_bor = explode(' ', $raw_bor);
}
switch (count($raw_bor)) {
case 1:
$raw_bor = array($raw_bor[0], $raw_bor[0], $raw_bor[0], $raw_bor[0]);
break;
case 2:
$raw_bor = array($raw_bor[0], $raw_bor[1], $raw_bor[0], $raw_bor[1]);
break;
case 3:
$raw_bor = array($raw_bor[0], $raw_bor[1], $raw_bor[2], $raw_bor[1]);
break;
}
$def_val['border-radius'] = $raw_bor;