function fontyourface_get_font in @font-your-face 7
Same name and namespace in other branches
- 6.2 fontyourface.module \fontyourface_get_font()
- 6 fontyourface.module \fontyourface_get_font()
- 7.2 fontyourface.module \fontyourface_get_font()
Gets a single font.
9 calls to fontyourface_get_font()
- FontyourfaceSaveFontTestCase::test in ./
fontyourface.test - fontyourface_admin_edit_form in ./
fontyourface.module - Edit form changes a single font, including CSS selector and enabled status.
- fontyourface_admin_edit_form_submit in ./
fontyourface.module - Edit form submit handler.
- fontyourface_admin_edit_form_title in ./
fontyourface.module - Provides title for edit form.
- fontyourface_save_font in ./
fontyourface.module - Adds or updates font, depending on whether it already exists.
File
- ./
fontyourface.module, line 864
Code
function fontyourface_get_font($fid, $clear = FALSE) {
static $fonts = array();
if ($clear) {
$fonts = array();
}
// if
if (!isset($fonts[$fid])) {
$fonts[$fid] = db_query('SELECT * FROM {fontyourface_font} WHERE fid = :fid', array(
':fid' => $fid,
))
->fetchObject();
fontyourface_add_font_tags($fonts[$fid]);
}
// if
return $fonts[$fid];
}