本文整理汇总了PHP中RevSliderOutput::getSlider方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderOutput::getSlider方法的具体用法?PHP RevSliderOutput::getSlider怎么用?PHP RevSliderOutput::getSlider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderOutput
的用法示例。
在下文中一共展示了RevSliderOutput::getSlider方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: putSlider
/**
*
* put the kb slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "")
{
if (strtolower($putIn) == "homepage" && is_front_page() == false) {
return false;
}
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
$slider = $output->getSlider();
return $slider;
}
示例2: putSlider
/**
*
* put the rev slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "")
{
$isPutIn = self::isPutIn($putIn);
if ($isPutIn == false) {
return false;
}
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
$slider = $output->getSlider();
return $slider;
}
示例3: putSlider
/**
*
* put the kb slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "")
{
$putIn = strtolower($putIn);
if ($putIn == "homepage") {
//filter by homepage
if (is_front_page() == false) {
return false;
}
} else {
//case filter by pages
if (!empty($putIn)) {
$arrPutInPages = array();
$arrPagesTemp = explode(",", $putIn);
foreach ($arrPagesTemp as $page) {
if (is_numeric($page) || $page == "homepage") {
$arrPutInPages[] = $page;
}
}
if (!empty($arrPutInPages)) {
//get current page id
$currentPageID = "";
if (is_front_page() == true) {
$currentPageID = "homepage";
} else {
global $post;
if (isset($post->ID)) {
$currentPageID = $post->ID;
}
}
//do the filter by pages
if (array_search($currentPageID, $arrPutInPages) === false) {
return false;
}
}
}
}
$output = new RevSliderOutput();
$output->putSliderBase($sliderID);
$slider = $output->getSlider();
return $slider;
}
示例4: putSlider
/**
* put the rev slider slider on the html page.
* @param $data - mixed, can be ID ot Alias.
*/
public static function putSlider($sliderID, $putIn = "", $gal_ids = array(), $settings = array(), $order = array())
{
$settings = apply_filters('revslider_modify_slider_settings', $settings, $sliderID);
$isPutIn = self::isPutIn($putIn);
if ($isPutIn == false) {
return false;
}
//check if on mobile and if option hide on mobile is set
$output = new RevSliderOutput();
$output->putSliderBase($sliderID, $gal_ids, false, $settings, $order);
$slider = $output->getSlider();
return $slider;
}