function page_title_form_forum_form_container_alter in Page Title 7.2
Same name and namespace in other branches
- 8.2 page_title.module \page_title_form_forum_form_container_alter()
- 6.2 page_title.module \page_title_form_forum_form_container_alter()
Implement hook_form_FORM_ID_alter().
1 call to page_title_form_forum_form_container_alter()
- page_title_form_forum_form_forum_alter in ./
page_title.module - Implement hook_form_FORM_ID_alter(). (We can re-use the above function)
File
- ./
page_title.module, line 273 - Enhanced control over the page title (in the head tag).
Code
function page_title_form_forum_form_container_alter(&$form, $form_state) {
$forum_vid = variable_get('forum_nav_vocabulary', 0);
$forum_vocab = taxonomy_vocabulary_load($forum_vid);
// Check the forum vocab has the show field enabled
if (variable_get('page_title_vocab_' . $forum_vocab->machine_name . '_showfield', 0)) {
$form['page_title'] = array(
'#type' => 'textfield',
'#title' => t('Page title'),
'#description' => t('Provide a description of this forum to appear in the <title> tag which search engines can use in search result listings (optional). It is generally accepted this field should be less than 70 characters.'),
'#default_value' => isset($form['tid']) ? page_title_load_title($form['tid']['#value'], 'term') : '',
'#size' => 60,
'#maxlength' => 255,
'#weight' => -20,
);
}
}