1 filter.admin.inc | filter_admin_enable($format = NULL) |
Page callback: Enable a text format.
File
- core/
modules/ filter/ filter.admin.inc, line 750 - Admin page callbacks for the Filter module.
Code
function filter_admin_enable($format = NULL) {
if (!isset($_GET['token']) || !backdrop_valid_token($_GET['token'], 'format-' . $format->format)) {
return MENU_ACCESS_DENIED;
}
if (isset($format)) {
filter_format_enable($format);
backdrop_set_message(t('Enabled text format %format.', array('%format' => $format->name)));
}
else {
backdrop_set_message(t('No text format provided.'), 'error');
}
backdrop_goto('admin/config/content/formats');
}