You are here

function fontyourface_get_fonts in @font-your-face 6.2

Same name and namespace in other branches
  1. 6 fontyourface.module \fontyourface_get_fonts()
  2. 7.2 fontyourface.module \fontyourface_get_fonts()
  3. 7 fontyourface.module \fontyourface_get_fonts()

Gets fonts, defualt to all enabled.

2 calls to fontyourface_get_fonts()
fontyourface_preprocess_page in ./fontyourface.module
Implements template_preprocess_page().
fontyourface_update_6200 in ./fontyourface.install
Implements hook_update_N().

File

./fontyourface.module, line 769

Code

function fontyourface_get_fonts($where = 'enabled = 1', $order_by = 'name ASC') {
  $fonts = array();
  $results = db_query('SELECT * FROM {fontyourface_font} WHERE ' . $where . ' ORDER BY ' . $order_by);
  while ($result = db_fetch_object($results)) {
    fontyourface_add_font_tags($result);
    $fonts[] = $result;
  }

  // while
  return $fonts;
}