Add a new input format.
1 call to filter_admin_add()
File
- modules/
filter.module, line 346 - Framework for handling filtering of content.
Code
function filter_admin_add() {
$edit = $_POST['edit'];
$name = trim($edit['name']);
if (strlen($name) == 0) {
drupal_set_message(t('You must enter a name for this input format.'));
drupal_goto('admin/filters');
}
else {
db_query("INSERT INTO {filter_formats} (name) VALUES ('%s')", $name);
}
drupal_set_message(t('Added input format %format.', array('%format' => theme('placeholder', $edit['name']))));
drupal_goto('admin/filters');
}
Login or register to post comments