function lightbox2_insert_content in Lightbox2 8
Same name and namespace in other branches
- 6 lightbox2.insert.inc \lightbox2_insert_content()
- 7.2 lightbox2.insert.inc \lightbox2_insert_content()
- 7 lightbox2.insert.inc \lightbox2_insert_content()
Implementation of hook_insert_content().
File
- ./
lightbox2.insert.inc, line 29 - Lightbox2 support for Insert module.
Code
function lightbox2_insert_content($item, $style, $widget) {
if (preg_match('/^lightbox2--((?:-(?!-)|[^-])+)--((?:-(?!-)|[^-])+)$/', $style['name'], $matches)) {
$image_preset_name = $matches[1];
$link_preset_name = $matches[2];
// @FIXME
// theme() has been renamed to _theme() and should NEVER be called directly.
// Calling _theme() directly can alter the expected output and potentially
// introduce security issues (see https://www.drupal.org/node/2195739). You
// should use renderable arrays instead.
//
//
// @see https://www.drupal.org/node/2195739
// return theme('lightbox2_insert_image', $item, $widget, 'view', $image_preset_name, $link_preset_name);
}
else {
return '';
}
}