本文整理汇总了PHP中RevSliderFunctions::strToBool方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderFunctions::strToBool方法的具体用法?PHP RevSliderFunctions::strToBool怎么用?PHP RevSliderFunctions::strToBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderFunctions
的用法示例。
在下文中一共展示了RevSliderFunctions::strToBool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$width_tablet = $_width_tablet;
}
$height_tablet = RevSliderFunctions::getVal($arrFieldsParams, "height_tablet");
if (intval($height_tablet) == 0) {
$height_tablet = 960;
}
$width_mobile = RevSliderFunctions::getVal($arrFieldsParams, "width_mobile", $_width_mobile);
if (intval($width_mobile) == 0) {
$width_mobile = $_width_mobile;
}
$height_mobile = RevSliderFunctions::getVal($arrFieldsParams, "height_mobile");
if (intval($height_mobile) == 0) {
$height_mobile = 720;
}
$advanced_sizes = RevSliderFunctions::getVal($arrFieldsParams, "advanced-responsive-sizes", 'false');
$advanced_sizes = RevSliderFunctions::strToBool($advanced_sizes);
$sliderType = RevSliderFunctions::getVal($arrFieldsParams, "slider_type");
?>
<div class="setting_box" id="rs-slider-layout-cont">
<h3><span class="setting-step-number">4</span><span><?php
_e("Slide Layout", REVSLIDER_TEXTDOMAIN);
?>
</span></h3>
<div class="inside" style="padding:0px">
<?php
$slider_type = RevSliderFunctions::getVal($arrFieldsParams, 'slider_type', 'fullwidth');
?>
<div style="background:#eee">
<div class="rs-slidesize-selector" >
示例2: 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
**/
//.........这里部分代码省略.........