You are here

function termstatus_taxonomy_term_load in Taxonomy Term Status 7

Implements hook_taxonomy_term_load().

File

./termstatus.module, line 169
Hook implementations and API for the taxonomy term status module.

Code

function termstatus_taxonomy_term_load($terms) {
  foreach ($terms as $term) {
    $term->status = termstatus_term_getstatus($term);
  }
  $result = db_query('SELECT tid, status FROM {termstatus} WHERE tid IN (:tids)', array(
    ':tids' => array_keys($terms),
  ));
  foreach ($result as $record) {
    $terms[$record->tid]->status = $record->status;
  }
}