function metatag_importer_nodewords_form in Metatag 7
Form generator for the migration selection form.
1 string reference to 'metatag_importer_nodewords_form'
- metatag_importer_menu in metatag_importer/
metatag_importer.module - Implements hook_menu().
File
- metatag_importer/
metatag_importer.nodewords.inc, line 24 - Convert data from Nodewords to Metatag.
Code
function metatag_importer_nodewords_form($form, &$form_state) {
$types = array();
if (db_table_exists('nodewords')) {
$types += _metatag_importer_list_nodewords();
}
if (!empty($types)) {
$form['types'] = array(
'#type' => 'checkboxes',
'#title' => t('Records to import'),
'#options' => $types,
);
$form['notes'] = array(
'#markup' => '<p>' . t('Notes') . ':' . '</p>' . '<ul>' . ' <li>' . t('All compatible records will be imported.') . '</li>' . ' <li>' . t('Records <strong>will be removed</strong> from the {nodewords} table upon completion, make sure to keep a backup of the table in case needed.') . '</li>' . ' <li>' . t('The import process may take some time, please be patient.') . '</li>' . ' <li>' . t('Nodewords stored each meta tag as a separate record, so there were many records for each entity or configuration.') . '</li>' . ' <li>' . t('Empty values will be removed, no additional logic is added to verify them.') . '</li>' . ' <li>' . t('Only node, taxonomy term, user, global, front page and error page records will be converted.') . '</li>' . ' <li>' . t('Custom paths, trackers, pagers and vocabularies are not supported yet.') . '</li>' . '</ul>',
);
$form['actions']['migrate'] = array(
'#type' => 'submit',
'#value' => t('Migrate all records'),
);
}
else {
$form['ohbother'] = array(
'#markup' => t('Nothing has been found that needs to be imported.'),
'#prefix' => '<p>',
'#suffix' => '</p>',
);
}
return $form;
}