You are here

option_nfs_inputformat.inc in Node and Comments Form Settings 6.3

File

includes/option_nfs_inputformat.inc
View source
<?php

/**
 * Hide the Input Format Fieldset
 */
function _option_nfs_inputformat(&$form, &$form_state, $settings, $node) {
  if (isset($form['body_field']['body']) && $settings['nfs_inputformat'] == 1) {
    unset($form['body_field']['format']);
  }
  if (module_exists('ipetranslation')) {
    $languages = i18n_language_list();
    foreach ($languages as $language => $language_title) {
      if ($language != $form['language']['#default_value']) {
        unset($form["body_field_{$language}"]["format_{$language}"]);
      }
    }
  }
  return $form;
}

Functions

Namesort descending Description
_option_nfs_inputformat Hide the Input Format Fieldset