Currently to alter any of the previews a developer would have to do so in hook_page_alter ideally we would have a theme function, however, with time constraints I think it would be acceptable to use a simple alter so that users could adjust the elements that display here. For instance when the original image is insanely larger someone could link to the original instead of showing it in all its pixelated glory on the preview page.

I will be posting a patch shortly.

Thanks,

Jonathan

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grndlvl’s picture

Status: Active » Needs review
FileSize
335 bytes
grndlvl’s picture

Assigned: grndlvl » Unassigned
bleen’s picture

Status: Needs review » Needs work

I think this should really be a theme function ... if for some reason it *must* be an alter, than it needs an entry in focal_point.api.php

awakash’s picture

awakash’s picture

awakash’s picture

Since focal point is up to 7.x-1.0, I've updated this patch accordingly.

bleen’s picture

@awakash - is there any reason why this *must* be an alter (as opposed to a theme function)?

grndlvl’s picture

No it's not a must. it was simply the convenience at the time of implementation.

I agree it would be better to add a theme function for _focal_point_preview() for building the output instead of using the generic build array.