Colorbox module does not preserve classes added by Media module.
I would like to suggest my modificaton to colorbox.theme.inc which allows to preserve all classes.

The code

  if (isset($item['attributes']['class'])) {
    $image['attributes']['class'] = $item['attributes']['class'];
  }

needs to be added to function theme_colorbox_image_formatter after this

if (isset($item['width']) && isset($item['height'])) {
    $image['width'] = $item['width'];
    $image['height'] = $item['height'];
  }

Comments

frjo’s picture

Status: Active » Postponed (maintainer needs more info)

The 7.x-2.x dev version already have this code:

  if (isset($item['attributes'])) {
    $image['attributes'] = $item['attributes'];
  }

The classes should be included with this I believe. Please try out the diversion and report back here.

VSZ’s picture

Yes, you are right. Latest dev preserve the classes.
Thank you.

frjo’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)