Issue #2009018 by InternetDevels: Replace theme() with drupal_render() in filter module.
parent
a544e13f51
commit
b61918f0ff
core/modules/filter
lib/Drupal/filter/Plugin/Filter
|
@ -1022,7 +1022,11 @@ function theme_filter_guidelines($variables) {
|
|||
$attributes['class'][] = 'filter-guidelines-' . $format->format;
|
||||
$output = '<div' . new Attribute($attributes) . '>';
|
||||
$output .= '<h4 class="label">' . check_plain($format->name) . '</h4>';
|
||||
$output .= theme('filter_tips', array('tips' => _filter_tips($format->format, FALSE)));
|
||||
$filter_tips = array(
|
||||
'#theme' => 'filter_tips',
|
||||
'#tips' => _filter_tips($format->format, FALSE),
|
||||
);
|
||||
$output .= drupal_render($filter_tips);
|
||||
$output .= '</div>';
|
||||
return $output;
|
||||
}
|
||||
|
@ -1404,7 +1408,11 @@ function _filter_html_image_secure_process($text) {
|
|||
}
|
||||
}
|
||||
// Replace an invalid image with an error indicator.
|
||||
theme('filter_html_image_secure_image', array('image' => $image));
|
||||
$filter_html_image_secure_image = array(
|
||||
'#theme' => 'filter_html_image_secure_image',
|
||||
'#image' => $image,
|
||||
);
|
||||
drupal_render($filter_html_image_secure_image);
|
||||
}
|
||||
$text = filter_dom_serialize($html_dom);
|
||||
return $text;
|
||||
|
|
|
@ -134,7 +134,12 @@ class FilterHtml extends FilterBase {
|
|||
);
|
||||
}
|
||||
}
|
||||
$output .= theme('table', array('header' => $header, 'rows' => $rows));
|
||||
$table = array(
|
||||
'#theme' => 'table',
|
||||
'#header' => $header,
|
||||
'#rows' => $rows,
|
||||
);
|
||||
$output .= drupal_render($table);
|
||||
|
||||
$output .= '<p>' . t('Most unusual characters can be directly entered without any problems.') . '</p>';
|
||||
$output .= '<p>' . t('If you do encounter problems, try using HTML character entities. A common example looks like &amp; for an ampersand & character. For a full list of entities see HTML\'s <a href="@html-entities">entities</a> page. Some of the available characters include:', array('@html-entities' => 'http://www.w3.org/TR/html4/sgml/entities.html')) . '</p>';
|
||||
|
@ -154,7 +159,12 @@ class FilterHtml extends FilterBase {
|
|||
array('data' => $entity[1], 'class' => array('get'))
|
||||
);
|
||||
}
|
||||
$output .= theme('table', array('header' => $header, 'rows' => $rows));
|
||||
$table = array(
|
||||
'#theme' => 'table',
|
||||
'#header' => $header,
|
||||
'#rows' => $rows,
|
||||
);
|
||||
$output .= drupal_render($table);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue