function _lightbox2_process_filter in Lightbox2 7.2
Same name and namespace in other branches
- 8 lightbox2.module \_lightbox2_process_filter()
- 7 lightbox2.module \_lightbox2_process_filter()
Process callback for Lightbox G2 filter.
1 string reference to '_lightbox2_process_filter'
- lightbox2_filter_info in ./
lightbox2.module - Implements hook_filter_info().
File
- ./
lightbox2.module, line 441 - Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.
Code
function _lightbox2_process_filter($text, $format) {
$text = ' ' . $text . ' ';
$text = preg_replace('/ShowItem/', 'DownloadItem', $text);
$text = preg_replace('/src="/', 'rel="lightbox" src="', $text);
$text = drupal_substr($text, 1, -1);
return $text;
}