Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MYMODULE_form_alter (&$form, &$form_state, $form_id)
- {
- // comments
- // http://api.drupal.org/api/drupal/modules--comment--comment.module/function/comment_form/6
- if ($form['#id'] == 'comment-form') {
- $form['comment_filter']['format'] = array(); // nuke wysiwyg from comments
- }
- }
- /**
- * Implements hook_comment_form_alter().
- */
- function comment_form_alter(&$form, &$form_state, &$form_id) {
- $form['comment_body']['#after_build'][] = 'MYMODULE_customize_comment_form';
- }
- /**
- * Comment body after-build function.
- */
- function MYMODULE_customize_comment_form(&$form) {
- // Hide text-format selector in comment form and fix format to filtered_html
- $form[LANGUAGE_NONE][0]['format']['format']['#value'] = 'filtered_html';
- $form[LANGUAGE_NONE][0]['format']['format']['#access'] = FALSE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement