nodewords_load_tags

Versions
6
nodewords_load_tags($options = array())

Load tags from table.

Parameters

$options An array of options.

Return value

An array of meta tags data as saved in the database table.

▾ 10 functions call nodewords_load_tags()

nodewords_admin_form_taxonomy_form_term_alter in contributions/nodewords/nodewords_admin/nodewords_admin.module
Implements hook_form_FORM_ID_alter().
nodewords_admin_form_taxonomy_form_vocabulary_alter in contributions/nodewords/nodewords_admin/nodewords_admin.module
Implements hook_form_FORM_ID_alter().
nodewords_admin_tags_edit_form in contributions/nodewords/nodewords_admin/nodewords_admin.admin.inc
Front page settings form.
nodewords_admin_tags_edit_form in contributions/nodewords/nodewords_admin/nodewords_admin.admin.inc
Front page settings form.
nodewords_load_tags in contributions/nodewords/nodewords.module
Load tags from table.
nodewords_nodeapi in contributions/nodewords/nodewords.module
Implements hook_nodeapi().
nodewords_preprocess_page in contributions/nodewords/nodewords.module
Implements hook_preprocess_page().
nodewords_user in contributions/nodewords/nodewords.module
Implements hook_user().
_nodewords_custom_pages_load_data in contributions/nodewords/nodewords_custom_pages/nodewords_custom_pages.module
Load the page meta tags data from the database.
_nodewords_tag_value in contributions/nodewords/nodewords.module

Code

contributions/nodewords/nodewords.module, line 542

<?php
function nodewords_load_tags($options = array()) {
  $tags = array();

  $options += _nodewords_get_default_metatags_type();
  $tags_info = nodewords_get_possible_tags();

  $result = _nodewords_get_tags_data_query($options);
  while ($row = db_fetch_object($result)) {
    if (isset($tags_info[$row->name])) {
      $tags[$row->name] = unserialize($row->content);
    }
  }

  if (empty($tags) && $options['type'] == NODEWORDS_TYPE_TERM) {
    $id = db_result(db_query_range(
      'SELECT vid FROM {term_data} WHERE tid = %d', $options['id'], 0, 1
    ));
    if ($id !== FALSE) {
      $options['type'] = NODEWORDS_TYPE_VOCABULARY;
      $options['id'] = $id;

      return nodewords_load_tags($options);
    }
  }

  return $tags;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.