You are here

option_nfs_body_description.inc in Node and Comments Form Settings 7.3

Same filename and directory in other branches
  1. 6.3 includes/option_nfs_body_description.inc

File

includes/option_nfs_body_description.inc
View source
<?php

/**
 * Set the node body description (help text).
 */
function _option_nfs_body_description(&$form, &$form_state, $settings, $node) {

  // Only proceed if the body_field element exists.
  if (!isset($form['body'])) {
    return $form;
  }
  $desc = t(check_plain(trim($settings['nfs_body_description'])));

  // Set help text for body field.
  if ($desc) {
    $lang = 'und';
    if (isset($form['body']['#language'])) {
      $lang = $form['body']['#language'];
    }
    $form['body'][$lang][0]['#description'] = $desc;
  }
  return $form;
}

Functions

Namesort descending Description
_option_nfs_body_description Set the node body description (help text).