本文整理匯總了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);
}