1 filter.module | filter_get_editors() |
Returns a list of text editors that are used with 'text_format' elements.
File
- core/
modules/ filter/ filter.module, line 862 - Framework for handling the filtering of content.
Code
function filter_get_editors() {
$editors = &backdrop_static(__FUNCTION__, NULL);
if (!isset($editors)) {
$editors = array();
$modules = module_implements('editor_info');
foreach ($modules as $module) {
$module_editors = module_invoke($module, 'editor_info');
foreach ($module_editors as $editor_name => $editor) {
$editor['module'] = $module;
// Populate optional defaults.
$editor += array(
'settings callback' => NULL,
'default settings' => array(),
'file' => NULL,
);
$editors[$editor_name] = $editor;
}
}
backdrop_alter('editor_info', $editors);
}
return $editors;
}