本文整理汇总了PHP中UniteFunctionsWPRev::getImagePathFromURL方法的典型用法代码示例。如果您正苦于以下问题:PHP UniteFunctionsWPRev::getImagePathFromURL方法的具体用法?PHP UniteFunctionsWPRev::getImagePathFromURL怎么用?PHP UniteFunctionsWPRev::getImagePathFromURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UniteFunctionsWPRev
的用法示例。
在下文中一共展示了UniteFunctionsWPRev::getImagePathFromURL方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drawImageInput
/**
*
* draw imaeg input:
* @param $setting
*/
protected function drawImageInput($setting)
{
$class = UniteFunctionsRev::getVal($setting, "class");
if (!empty($class)) {
$class = "class='{$class}'";
}
$settingsID = $setting["id"];
$buttonID = $settingsID . "_button";
$spanPreviewID = $buttonID . "_preview";
$img = "";
$value = UniteFunctionsRev::getVal($setting, "value");
if (!empty($value)) {
$urlImage = $value;
$imagePath = UniteFunctionsWPRev::getImageRealPathFromUrl($urlImage);
if (file_exists($realPath)) {
$filepath = UniteFunctionsWPRev::getImagePathFromURL($urlImage);
$urlImage = UniteBaseClassRev::getImageUrl($filepath, 100, 70, true);
}
$img = "<img width='100' height='70' src='{$urlImage}'></img>";
}
?>
<span id='<?php
echo $spanPreviewID;
?>
' class='setting-image-preview'><?php
echo $img;
?>
</span>
<input type="hidden" id="<?php
echo $setting["id"];
?>
" name="<?php
echo $setting["name"];
?>
" value="<?php
echo $setting["value"];
?>
" />
<input type="button" id="<?php
echo $buttonID;
?>
" class='button-image-select <?php
echo $class;
?>
' value="Choose Image"></input>
<?php
}
示例2: getParamsForExport
/**
*
* get params for export
*/
public function getParamsForExport()
{
$arrParams = $this->getParams();
$urlImage = UniteFunctionsRev::getVal($arrParams, "image");
if (!empty($urlImage)) {
$arrParams["image"] = UniteFunctionsWPRev::getImagePathFromURL($urlImage);
}
return $arrParams;
}
示例3: setImageByImageID
/**
*
* set slide image by image id
*/
private function setImageByImageID($imageID)
{
$this->imageID = $imageID;
$this->imageUrl = UniteFunctionsWPRev::getUrlAttachmentImage($imageID);
$this->imageThumb = UniteFunctionsWPRev::getUrlAttachmentImage($imageID, UniteFunctionsWPRev::THUMB_MEDIUM);
if (empty($this->imageUrl)) {
return false;
}
$this->params["background_type"] = "image";
if (Mage::helper('nwdrevslider')->isSsl()) {
$this->imageUrl = str_replace("http://", "https://", $this->imageUrl);
}
$this->imageFilepath = UniteFunctionsWPRev::getImagePathFromURL($this->imageUrl);
$realPath = UniteFunctionsWPRev::getPathContent() . $this->imageFilepath;
if (file_exists($realPath) == false || is_file($realPath) == false) {
$this->imageFilepath = "";
}
$this->imageFilename = basename($this->imageUrl);
}