Commit 0a788a2e authored by webchick's avatar webchick

Issue #2009018 follow-up by StephaneQ: One more replace theme() with...

Issue #2009018 follow-up by StephaneQ: One more replace theme() with drupal_render() in filter module.
parent 6bec9b2f
......@@ -70,12 +70,14 @@ public function process($text, $langcode, $cache, $cache_id) {
// Given the updated node, caption and alignment: re-render it with a
// caption.
$altered_html = theme('filter_caption', array(
'node' => $node->C14N(),
'tag' => $node->tagName,
'caption' => $caption,
'align' => $align,
));
$filter_caption = array(
'#theme' => 'filter_caption',
'#node' => $node->C14N(),
'#tag' => $node->tagName,
'#caption' => $caption,
'#align' => $align,
);
$altered_html = drupal_render($filter_caption);
// Load the altered HTML into a new DOMDocument and retrieve the element.
$updated_node = filter_dom_load($altered_html)->getElementsByTagName('body')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment