function nodewords_basic_canonical_form in Nodewords: D6 Meta Tags 6.3
Same name and namespace in other branches
- 6 nodewords_basic/nodewords_basic.module \nodewords_basic_canonical_form()
- 6.2 nodewords_basic/includes/nodewords_basic.nodewords.tags.inc \nodewords_basic_canonical_form()
Set the form fields used to implement the options for the meta tag.
File
- nodewords_basic/
includes/ nodewords_basic.nodewords.tags.inc, line 37 - Meta tags definition file.
Code
function nodewords_basic_canonical_form(&$form, $content, $options) {
$form['canonical'] = array(
'#tree' => TRUE,
);
$form['canonical']['value'] = array(
'#type' => 'textfield',
'#title' => t('Canonical URL'),
'#description' => t('Canonical URLs are used from the search engines, and allow them to not report duplicate titles for HTML pages that are accessible from different URLs. Use a relative URL without the initial slash or enter <code><front></code> for the front page path; canonical URLs that point to a different domain are normally not accepted.') . $options['description'],
'#default_value' => empty($content['value']) ? '' : $content['value'],
'#element_validate' => array(
'nodewords_validate_element',
),
'#validate_args' => array(
'module' => 'nodewords_basic',
'callback' => 'nodewords_basic_canonical_form_validate',
),
'#maxlength' => variable_get('nodewords_max_size', 350),
);
}