You are here

function fontyourface_delete_font in @font-your-face 6.2

Same name and namespace in other branches
  1. 6 fontyourface.module \fontyourface_delete_font()

Deletes a single font.

1 call to fontyourface_delete_font()
local_fonts_delete_fontface_submit in modules/local_fonts/local_fonts.module

File

./fontyourface.module, line 882

Code

function fontyourface_delete_font($font) {
  $delete = TRUE;
  $delete_function = $font->provider . '_fontyourface_delete';
  if (function_exists($delete_function)) {
    $delete = $delete_function($font);
  }

  // if
  if ($delete) {

    // Delete font and font-tag relationships.
    $font_sql = "DELETE f.*, tf.*\n    FROM {fontyourface_font} f\n    LEFT JOIN {fontyourface_tag_font} tf\n      ON tf.fid = f.fid\n    WHERE f.fid = %d";
    db_query($font_sql, $font->fid);
    fontyourface_delete_unused_tags();
  }

  // if
}