Commit 80fdd085 authored by alexpott's avatar alexpott

Issue #2008976 by InternetDevels: Replace theme() with drupal_render() in ckeditor module.

parent 972bed0f
......@@ -58,7 +58,12 @@ function theme_ckeditor_settings_toolbar($variables) {
$value = $button['image_alternative' . $rtl];
}
elseif (isset($button['image'])) {
$value = theme('image', array('uri' => $button['image' . $rtl], 'title' => $button['label']));
$image = array(
'#theme' => 'image',
'#uri' => $button['image' . $rtl],
'#title' => $button['label'],
);
$value = drupal_render($image);
}
else {
$value = '?';
......
......@@ -51,7 +51,11 @@ public function getDefaultSettings() {
public function settingsForm(array $form, array &$form_state, EditorEntity $editor) {
$module_path = drupal_get_path('module', 'ckeditor');
$manager = drupal_container()->get('plugin.manager.ckeditor.plugin');
$ckeditor_settings_toolbar = array(
'#theme' => 'ckeditor_settings_toolbar',
'#editor' => $editor,
'#plugins' => $manager->getButtonsPlugins($editor),
);
$form['toolbar'] = array(
'#type' => 'container',
'#attached' => array(
......@@ -60,7 +64,7 @@ public function settingsForm(array $form, array &$form_state, EditorEntity $edit
array(
'type' => 'setting',
'data' => array('ckeditor' => array(
'toolbarAdmin' => theme('ckeditor_settings_toolbar', array('editor' => $editor, 'plugins' => $manager->getButtonsPlugins($editor))),
'toolbarAdmin' => drupal_render($ckeditor_settings_toolbar),
)),
)
),
......
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