function easychart_wysiwyg_filter_easychart_process in Easychart 7.3
Process callback for hook_filter
1 string reference to 'easychart_wysiwyg_filter_easychart_process'
- easychart_wysiwyg_filter_info in modules/
easychart_wysiwyg/ easychart_wysiwyg.module - Implements hook_filter_info().
File
- modules/
easychart_wysiwyg/ easychart_wysiwyg.module, line 161 - Easychart WYSIWYG integration.
Code
function easychart_wysiwyg_filter_easychart_process($text, $filter, $format, $langcode, $cache, $cache_id) {
if (preg_match('/\\[\\[chart-nid:(\\d+),chart-view-mode:(\\w+)\\]\\]/', $text, $matches)) {
return preg_replace_callback('/\\[\\[chart-nid:(\\d+),chart-view-mode:(\\w+)\\]\\]/', '_easychart_wysiwyg_render_node', $text);
}
else {
if (preg_match('/\\[\\[chart-nid:(\\d+)\\]\\]/', $text, $matches)) {
return preg_replace_callback('/\\[\\[chart-nid:(\\d+)\\]\\]/', '_easychart_wysiwyg_render_node', $text);
}
else {
return $text;
}
}
}