Problem

We need a feature that allowv us to add a new colorbox styles using a hook.

Solution

Use drupal_alter passing $colorbox_style by reference: drupal_alter('colorbox_styles', $colorbox_styles)
This solution allow thirt party modules to use a hook_colorbox_styles_alter to modify the array that add styles on administrative section.

Example (how to)

1 - In your module, you implement the hook_colorbox_styles_alter.
Add a new item on array.

function MYMODULE_colorbox_styles_alter(&$colorbox_styles){
  $colorbox_styles['/path/to/folder/new/style'] = 'New Style';
}

2 - In your folder style you must create a colorbox.css file.

3 - In colorbox settings you will see a new style
alt

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cesarromagnolo created an issue. See original summary.

cesarromagnolo’s picture

Issue summary: View changes
cesarromagnolo’s picture

FileSize
462 bytes
Neslee Canil Pinto’s picture

Status: Active » Closed (won't fix)