You are here

function _option_nfs_title_description in Node and Comments Form Settings 6.3

Same name and namespace in other branches
  1. 7.3 includes/option_nfs_title_description.inc \_option_nfs_title_description()

Set the node title description (help text).

File

includes/option_nfs_title_description.inc, line 6

Code

function _option_nfs_title_description(&$form, &$form_state, $settings, $node) {

  // Only proceed if the title element exists.
  if (!isset($form['title'])) {
    return $form;
  }

  // Set help text for title field.
  $form['title']['#description'] = empty($form['title']['#description']) ? t($settings['nfs_title_description']) : $form['title']['#description'] . ' ' . t($settings['nfs_title_description']);
  return $form;
}