本文整理汇总了PHP中RevSliderFunctions::getGetVar方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderFunctions::getGetVar方法的具体用法?PHP RevSliderFunctions::getGetVar怎么用?PHP RevSliderFunctions::getGetVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderFunctions
的用法示例。
在下文中一共展示了RevSliderFunctions::getGetVar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
<?php
if (!defined('ABSPATH')) {
exit;
}
//get input
$slideID = RevSliderFunctions::getGetVar("id");
if ($slideID == 'new') {
//add new transparent slide
$sID = intval(RevSliderFunctions::getGetVar("slider"));
if ($sID > 0) {
$revs = new RevSlider();
$revs->initByID($sID);
//check if we already have slides, if yes, go to first
$arrS = $revs->getSlides(false);
if (empty($arrS)) {
$slideID = $revs->createSlideFromData(array('sliderid' => $sID), true);
} else {
$slideID = key($arrS);
}
}
}
$patternViewSlide = self::getViewUrl("slide", "id=[slideid]");
//init slide object
$slide = new RevSlide();
$slide->initByID($slideID);
$slideParams = $slide->getParams();
$operations = new RevSliderOperations();
//init slider object
$sliderID = $slide->getSliderID();
$slider = new RevSlider();
示例2: onShowImage
/**
*
* on show image ajax event. outputs image with parameters
*/
public static function onShowImage()
{
$pathImages = RevSliderFunctionsWP::getPathContent();
$urlImages = RevSliderFunctionsWP::getUrlContent();
try {
$imageID = intval(RevSliderFunctions::getGetVar("img"));
$img = wp_get_attachment_image_src($imageID, 'thumb');
if (empty($img)) {
exit;
}
self::outputImage($img[0]);
} catch (Exception $e) {
header("status: 500");
echo $e->getMessage();
exit;
}
}