function shrinktheweb_deleteThumbnail in ShrinkTheWeb 8
Same name and namespace in other branches
- 6 shrinktheweb.api.inc \shrinktheweb_deleteThumbnail()
- 7 shrinktheweb.api.inc \shrinktheweb_deleteThumbnail()
Delete thumbnail.
Parameters
$sUrl:
array $aOptions:
1 call to shrinktheweb_deleteThumbnail()
- shrinktheweb_refreshThumbnail in ./
shrinktheweb.api.inc - Refresh a thumbnail for a url with specified options. First delete it and then do a new request and return the HTML for image loading. !!! SLIGHTLY CHANGED FOR DRUPAL !!!
File
- ./
shrinktheweb.api.inc, line 65
Code
function shrinktheweb_deleteThumbnail($sUrl, $aOptions = array()) {
$aOptions = shrinktheweb_generateOptions($aOptions);
$aArgs = shrinktheweb_generateRequestArgs($aOptions);
$aArgs['stwurl'] = $sUrl;
$sFilename = shrinktheweb_generateHash($aArgs) . '.jpg';
$sFile = THUMBNAIL_DIR . $sFilename;
if (file_exists($sFile)) {
@unlink($sFile);
}
}