本文整理汇总了PHP中Shopp::add_query_string方法的典型用法代码示例。如果您正苦于以下问题:PHP Shopp::add_query_string方法的具体用法?PHP Shopp::add_query_string怎么用?PHP Shopp::add_query_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shopp
的用法示例。
在下文中一共展示了Shopp::add_query_string方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: url
/**
* Returns a URL for a resized image.
*
* If direct mode is enabled (which it is by
* default) and the image is already cached to the file system then a URL for that
* file will be returned.
*
* In all other cases a Shopp Image Server URL will be returned.
*
* @param $width
* @param $height
* @param $scale
* @param $sharpen
* @param $quality
* @param $fill
* @return string
*/
public function url($width = null, $height = null, $scale = null, $sharpen = null, $quality = null, $fill = null)
{
$request = array();
$url = Shopp::url('' != get_option('permalink_structure') ? trailingslashit($this->id) . $this->filename : $this->id, 'images');
// Get the current URI
$uri = $this->uri;
// Handle resize requests
$params = func_get_args();
if (count($params) > 0) {
list($width, $height, $scale, $sharpen, $quality, $fill) = $params;
$request = $this->resizing($width, $height, $scale, $sharpen, $quality, $fill);
// Build the path to the cached copy of the file (if it exists)
$size = $this->cachefile($request);
$uri = "cache_{$size}_{$this->filename}";
// Override the URI for the request
}
// Ask the engine if we have a direct URL
$direct_url = $this->engine()->direct($uri);
if (false !== $direct_url) {
return $direct_url;
}
if (empty($request)) {
return $url;
} else {
return Shopp::add_query_string($request, $url);
}
}
示例2: add_query_string
/**
* @deprecated Use Shopp::add_query_string()
**/
function add_query_string($string, $url)
{
return Shopp::add_query_string($string, $url);
}