You are here

function fontyourface_get_fonts in @font-your-face 7.2

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

Gets fonts, defaults to all enabled.

16 calls to fontyourface_get_fonts()
fonts_com_saved_api_font in modules/fonts_com/fonts_com.module
Loads saved version of API font, or saves new copy if not already saved.
fontyourface_features_export in ./fontyourface.features.inc
Implements hook_features_export [component hook]
fontyourface_features_export_options in ./fontyourface.features.inc
Implements hook_features_export_options. [component_hook]
fontyourface_features_export_render in ./fontyourface.features.inc
Implements hook_features_export_render. [component hook]
fontyourface_fyf_status in drush/fontyourface.drush.inc
Callback for Drush command 'fyf-status'.

... See full list

File

./fontyourface.module, line 260

Code

function fontyourface_get_fonts($where = "enabled = 1 AND css_selector != ''", $order_by = 'name ASC') {
  $fonts = array();
  $results = db_query('SELECT * FROM {fontyourface_font} WHERE ' . $where . ' ORDER BY ' . $order_by);
  while ($result = $results
    ->fetchObject()) {
    fontyourface_add_font_tags($result);
    $fonts[$result->fid] = $result;
  }

  // while
  return $fonts;
}