Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save szeidler/f9445e1b2bc140d48f019da8062c2c23 to your computer and use it in GitHub Desktop.
Save szeidler/f9445e1b2bc140d48f019da8062c2c23 to your computer and use it in GitHub Desktop.
Fotoweb: Alter the file path for manualcrop selection. That is needed, because manualcrop settings are stored for $file->uri not image style path.
diff --git a/manualcrop.helpers.inc b/manualcrop.helpers.inc
index 1375f99..090cca0 100644
--- a/manualcrop.helpers.inc
+++ b/manualcrop.helpers.inc
@@ -636,6 +636,8 @@ function manualcrop_save_crop_data($file, $data) {
* - "height": An integer representing the height in pixels.
*/
function manualcrop_load_crop_selection($file, $style_name = NULL) {
+ drupal_alter('manualcrop_load_crop_selection', $file);
+
$query = db_select('manualcrop', 'mc');
$use_revisions = module_exists('file_entity_revisions');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment