function faq_load in Frequently Asked Questions 7
Same name and namespace in other branches
- 5.2 faq.module \faq_load()
- 6 faq.module \faq_load()
Implements hook_load().
Initialises $node->question using the value in the 'faq_questions' table.
Parameters
array $nodes: The node objects array.
File
- ./
faq.module, line 307 - The FAQ module allows users to create a FAQ page, with questions and answers displayed in different styles, according to the settings.
Code
function faq_load($nodes) {
return;
// @codingStandardsIgnoreStart
/*
foreach ($nodes as $nid => &$node) {
// @todo: change logic to load faq nodes - do not rely on specific faq table
$result = db_query('SELECT question, detailed_question FROM {faq_questions} WHERE nid = :nid AND vid = :vid', array(
':nid' => $node->nid,
':vid' => $node->vid,
))->fetchObject();
if ($result && !drupal_match_path($_GET['q'], 'node/' . $node->nid . '/edit')) {
$question_length = variable_get('faq_question_length', 'short');
if ($question_length == 'long' && !empty($result->detailed_question)) {
$result->title = $result->detailed_question;
}
else {
$result->title = $result->question;
}
}
foreach ($result as $property => &$value) {
$node->$property = $value;
}
}
*/
// @codingStandardsIgnoreEnd
}