function fontyourface_add_font_tags in @font-your-face 6.2
Same name and namespace in other branches
- 7.2 fontyourface.module \fontyourface_add_font_tags()
- 7 fontyourface.module \fontyourface_add_font_tags()
Adds tags to a font object.
3 calls to fontyourface_add_font_tags()
- fontyourface_get_font in ./
fontyourface.module - Gets a single font.
- fontyourface_get_fonts in ./
fontyourface.module - Gets fonts, defualt to all enabled.
- fontyourface_save_font in ./
fontyourface.module - Adds or updates font, depending on whether it already exists.
File
- ./
fontyourface.module, line 809
Code
function fontyourface_add_font_tags(&$font) {
$font->tags = array();
$tag_sql = 'SELECT t.*
FROM {fontyourface_tag} t
INNER JOIN {fontyourface_tag_font} tf
ON tf.tid = t.tid
WHERE tf.fid = %d';
$tag_results = db_query($tag_sql, $font->fid);
while ($tag = db_fetch_object($tag_results)) {
$font->tags[$tag->tid] = $tag->name;
}
// while
}