本文整理汇总了PHP中RevSlider::initByAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSlider::initByAlias方法的具体用法?PHP RevSlider::initByAlias怎么用?PHP RevSlider::initByAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSlider
的用法示例。
在下文中一共展示了RevSlider::initByAlias方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RevSlider
function estetico_add_body_class($classes)
{
global $template_name;
if (is_front_page() || $template_name == 'home') {
$classes[] = 'home';
} else {
$classes[] = 'inner';
}
if (estetico_show_slider()) {
$classes[] = 'show-rev-slider';
} else {
$classes[] = 'show-flat-header';
}
try {
if (class_exists('RevSlider')) {
$revSlider = new RevSlider();
$revSlider->initByAlias(estetico_get_setting('revslider_id'));
}
} catch (Exception $ex) {
$classes[] = "missing-rev-slider";
}
if (false == estetico_show_slider() && '' == estetico_get_setting('inner_pages_header')) {
$classes[] = 'empty-header';
}
$sidebar_position = estetico_get_setting('sidebar_position');
$classes[] = 'sidebar-position-' . $sidebar_position;
return $classes;
}
示例2: block
function block($instance)
{
extract($instance);
if ($mb == '') {
$mb = '58';
}
$slider5 = new RevSlider();
$arrSliders = $slider5->getArrSliders();
$sliders_test = '';
foreach ($arrSliders as $slider5t) {
$sliders_test .= $slider5t->getAlias();
}
if ($sliders_test != '') {
$slider5->initByAlias($re);
$sliderParams = $slider5->getParams();
$revh = $sliderParams["height"];
$salias = '';
foreach ($arrSliders as $slider5) {
$salias .= $slider5->getAlias();
}
if ($salias != '') {
if ($f == 'yes') {
echo '<div class="fullwimage rev_slider_fullw">';
putRevSlider($re);
echo '</div><div style="height:' . $revh . 'px;margin-bottom:' . $mb . 'px;" class="cl"></div>';
} else {
putRevSlider($re);
}
}
}
//sliders test end
}
示例3: slideshow_already_installed
private function slideshow_already_installed($slideshow)
{
$exists = false;
switch ($slideshow['type']) {
case 'revslider':
if (class_exists('RevSlider')) {
$revslider = new RevSlider();
try {
$revslider->initByAlias($slideshow['alias']);
$exists = true;
} catch (Exception $e) {
$exists = false;
}
}
break;
}
return $exists;
}