You are here

function page_title_form_alter in Page Title 5

Same name and namespace in other branches
  1. 8.2 page_title.module \page_title_form_alter()
  2. 5.2 page_title.module \page_title_form_alter()
  3. 6.2 page_title.module \page_title_form_alter()
  4. 6 page_title.module \page_title_form_alter()
  5. 7.2 page_title.module \page_title_form_alter()
  6. 7 page_title.module \page_title_form_alter()

Implementation of hook_form_alter().

File

./page_title.module, line 90
Enhanced control over the page title (in the head tag).

Code

function page_title_form_alter($form_id, &$form) {
  if ($form['#id'] == 'node-form' && user_access('set page title')) {
    $form['page_title'] = array(
      '#type' => 'textfield',
      '#title' => t('Page title'),
      '#description' => t('Optionally specify a different title to appear in the <title> tag of the page.'),
      '#default_value' => $form['#node']->page_title,
      '#size' => 60,
      '#maxlength' => 255,
      '#weight' => -4,
    );
  }
}