function image_replace_get in Image Replace 7
Determine replacement image uri for the given original filename.
Parameters
string $target_style: The target image style name.
string $target_uri: The uri of the image for which to find a replacement.
Return value
string|null The replacement uri when a mapping for the given uri/style combination exists.
1 call to image_replace_get()
- image_replace_effect in ./
image_replace.module - Image effect callback: Change the image if a replacement is available.
File
- ./
image_replace.module, line 20 - Provides an image style effect replacing the whole image with another one.
Code
function image_replace_get($target_style, $target_uri) {
return db_select('image_replace')
->fields('image_replace', array(
'replacement_uri',
))
->condition('target_style', $target_style)
->condition('target_uri', $target_uri)
->execute()
->fetchField();
}